Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions homeassistant/components/binary_sensor/zwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

def get_device(value, **kwargs):
"""Create zwave entity device."""
value.set_change_verified(False)

device_mapping = workaround.get_device_mapping(value)
if device_mapping == workaround.WORKAROUND_NO_OFF_EVENT:
# Default the multiplier to 4
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/climate/zwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
def get_device(hass, value, **kwargs):
"""Create zwave entity device."""
temp_unit = hass.config.units.temperature_unit
value.set_change_verified(False)
return ZWaveClimate(value, temp_unit)


Expand Down
5 changes: 0 additions & 5 deletions homeassistant/components/cover/zwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ def get_device(value, **kwargs):
"""Create zwave entity device."""
if (value.command_class == zwave.const.COMMAND_CLASS_SWITCH_MULTILEVEL
and value.index == 0):
value.set_change_verified(False)
return ZwaveRollershutter(value)
elif (value.command_class == zwave.const.COMMAND_CLASS_SWITCH_BINARY or
value.command_class == zwave.const.COMMAND_CLASS_BARRIER_OPERATOR):
if (value.type != zwave.const.TYPE_BOOL and
value.genre != zwave.const.GENRE_USER):
return None
value.set_change_verified(False)
return ZwaveGarageDoor(value)
return None

Expand Down
8 changes: 0 additions & 8 deletions homeassistant/components/light/zwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ def get_device(node, value, node_config, **kwargs):
_LOGGER.debug('name=%s node_config=%s CONF_REFRESH_VALUE=%s'
' CONF_REFRESH_DELAY=%s', name, node_config,
refresh, delay)
if value.command_class != zwave.const.COMMAND_CLASS_SWITCH_MULTILEVEL:
return None
if value.type != zwave.const.TYPE_BYTE:
return None
if value.genre != zwave.const.GENRE_USER:
return None

value.set_change_verified(False)

if node.has_command_class(zwave.const.COMMAND_CLASS_SWITCH_COLOR):
return ZwaveColorLight(value, refresh, delay)
Expand Down
7 changes: 0 additions & 7 deletions homeassistant/components/lock/zwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,6 @@ def clear_usercode(service):
_LOGGER.info('Usercode at slot %s is cleared', value.index)
break

if value.command_class != zwave.const.COMMAND_CLASS_DOOR_LOCK:
return None
if value.type != zwave.const.TYPE_BOOL:
return None
if value.genre != zwave.const.GENRE_USER:
return None
if node.has_command_class(zwave.const.COMMAND_CLASS_USER_CODE):
hass.services.register(DOMAIN,
SERVICE_SET_USERCODE,
Expand All @@ -197,7 +191,6 @@ def clear_usercode(service):
clear_usercode,
descriptions.get(SERVICE_CLEAR_USERCODE),
schema=CLEAR_USERCODE_SCHEMA)
value.set_change_verified(False)
return ZwaveLock(value)


Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/sensor/zwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

def get_device(node, value, **kwargs):
"""Create zwave entity device."""
value.set_change_verified(False)

# Generic Device mappings
if node.has_command_class(zwave.const.COMMAND_CLASS_SENSOR_MULTILEVEL):
return ZWaveMultilevelSensor(value)
Expand Down
9 changes: 1 addition & 8 deletions homeassistant/components/switch/zwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@
_LOGGER = logging.getLogger(__name__)


# pylint: disable=unused-argument
def get_device(node, value, **kwargs):
def get_device(value, **kwargs):
"""Create zwave entity device."""
if not node.has_command_class(zwave.const.COMMAND_CLASS_SWITCH_BINARY):
return None
if value.type != zwave.const.TYPE_BOOL or value.genre != \
zwave.const.GENRE_USER:
return None
value.set_change_verified(False)
return ZwaveSwitch(value)


Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/zwave/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ def __init__(self, value, domain):
from openzwave.network import ZWaveNetwork
from pydispatch import dispatcher
self._value = value
self._value.set_change_verified(False)
self.entity_id = "{}.{}".format(domain, self._object_id())
self._update_attributes()

Expand Down