From ab2e85840fd76930fb666f25afc9e7a3e86fca56 Mon Sep 17 00:00:00 2001 From: John Arild Berentsen Date: Sun, 8 May 2016 18:52:16 +0200 Subject: [PATCH] Fix for not recognizing Z-Wave thermostats (#2006) * Fix for not recognizing thermostats * Properly ignore zxt-120 * fix --- homeassistant/components/thermostat/zwave.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/thermostat/zwave.py b/homeassistant/components/thermostat/zwave.py index ef72fc55c10..a8632cde128 100644 --- a/homeassistant/components/thermostat/zwave.py +++ b/homeassistant/components/thermostat/zwave.py @@ -17,7 +17,7 @@ DEFAULT_NAME = 'ZWave Thermostat' REMOTEC = 0x5254 REMOTEC_ZXT_120 = 0x8377 -REMOTEC_ZXT_120_THERMOSTAT = (REMOTEC, REMOTEC_ZXT_120, 0) +REMOTEC_ZXT_120_THERMOSTAT = (REMOTEC, REMOTEC_ZXT_120) WORKAROUND_IGNORE = 'ignore' @@ -40,16 +40,15 @@ def setup_platform(hass, config, add_devices, discovery_info=None): if (value.node.manufacturer_id.strip() and value.node.product_id.strip()): specific_sensor_key = (int(value.node.manufacturer_id, 16), - int(value.node.product_id, 16), - value.index) + int(value.node.product_id, 16)) if specific_sensor_key in DEVICE_MAPPINGS: if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND_IGNORE: _LOGGER.debug("Remotec ZXT-120 Zwave Thermostat, ignoring") return - else: - add_devices([ZWaveThermostat(value)]) - _LOGGER.debug("discovery_info=%s and zwave.NETWORK=%s", - discovery_info, zwave.NETWORK) + + add_devices([ZWaveThermostat(value)]) + _LOGGER.debug("discovery_info=%s and zwave.NETWORK=%s", + discovery_info, zwave.NETWORK) # pylint: disable=too-many-arguments