Merge pull request #1446 from balloob/hotfix/0.14.2

Hotfix/0.14.2
This commit is contained in:
Paulus Schoutsen 2016-02-29 08:22:26 -08:00
commit 395a8663b5
3 changed files with 30 additions and 23 deletions

View File

@ -39,12 +39,15 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
node = NETWORK.nodes[discovery_info[ATTR_NODE_ID]] node = NETWORK.nodes[discovery_info[ATTR_NODE_ID]]
value = node.values[discovery_info[ATTR_VALUE_ID]] value = node.values[discovery_info[ATTR_VALUE_ID]]
value.set_change_verified(False)
# Make sure that we have values for the key before converting to int
if (value.node.manufacturer_id.strip() and
value.node.product_id.strip()):
specific_sensor_key = (int(value.node.manufacturer_id, 16), specific_sensor_key = (int(value.node.manufacturer_id, 16),
int(value.node.product_id, 16), int(value.node.product_id, 16),
value.index) value.index)
value.set_change_verified(False)
if specific_sensor_key in DEVICE_MAPPINGS: if specific_sensor_key in DEVICE_MAPPINGS:
if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND_NO_OFF_EVENT: if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND_NO_OFF_EVENT:
# Default the multiplier to 4 # Default the multiplier to 4
@ -53,8 +56,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
ZWaveTriggerSensor(value, "motion", ZWaveTriggerSensor(value, "motion",
hass, re_arm_multiplier * 8) hass, re_arm_multiplier * 8)
]) ])
return
elif value.command_class == COMMAND_CLASS_SENSOR_BINARY: if value.command_class == COMMAND_CLASS_SENSOR_BINARY:
add_devices([ZWaveBinarySensor(value, None)]) add_devices([ZWaveBinarySensor(value, None)])

View File

@ -50,6 +50,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
# groups[1].associations): # groups[1].associations):
# node.groups[1].add_association(NETWORK.controller.node_id) # node.groups[1].add_association(NETWORK.controller.node_id)
# Make sure that we have values for the key before converting to int
if (value.node.manufacturer_id.strip() and
value.node.product_id.strip()):
specific_sensor_key = (int(value.node.manufacturer_id, 16), specific_sensor_key = (int(value.node.manufacturer_id, 16),
int(value.node.product_id, 16), int(value.node.product_id, 16),
value.index) value.index)
@ -60,7 +63,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
return return
# Generic Device mappings # Generic Device mappings
elif value.command_class == COMMAND_CLASS_SENSOR_MULTILEVEL: if value.command_class == COMMAND_CLASS_SENSOR_MULTILEVEL:
add_devices([ZWaveMultilevelSensor(value)]) add_devices([ZWaveMultilevelSensor(value)])
elif (value.command_class == COMMAND_CLASS_METER and elif (value.command_class == COMMAND_CLASS_METER and

View File

@ -1,7 +1,7 @@
# coding: utf-8 # coding: utf-8
"""Constants used by Home Assistant components.""" """Constants used by Home Assistant components."""
__version__ = "0.14.1" __version__ = "0.14.2"
# Can be used to specify a catch all when registering state or event listeners. # Can be used to specify a catch all when registering state or event listeners.
MATCH_ALL = '*' MATCH_ALL = '*'