mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix for not recognizing Z-Wave thermostats (#2006)
* Fix for not recognizing thermostats * Properly ignore zxt-120 * fix
This commit is contained in:
parent
8257e3f384
commit
ab2e85840f
@ -17,7 +17,7 @@ DEFAULT_NAME = 'ZWave Thermostat'
|
|||||||
|
|
||||||
REMOTEC = 0x5254
|
REMOTEC = 0x5254
|
||||||
REMOTEC_ZXT_120 = 0x8377
|
REMOTEC_ZXT_120 = 0x8377
|
||||||
REMOTEC_ZXT_120_THERMOSTAT = (REMOTEC, REMOTEC_ZXT_120, 0)
|
REMOTEC_ZXT_120_THERMOSTAT = (REMOTEC, REMOTEC_ZXT_120)
|
||||||
|
|
||||||
WORKAROUND_IGNORE = 'ignore'
|
WORKAROUND_IGNORE = 'ignore'
|
||||||
|
|
||||||
@ -40,16 +40,15 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
if (value.node.manufacturer_id.strip() and
|
if (value.node.manufacturer_id.strip() and
|
||||||
value.node.product_id.strip()):
|
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)
|
|
||||||
if specific_sensor_key in DEVICE_MAPPINGS:
|
if specific_sensor_key in DEVICE_MAPPINGS:
|
||||||
if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND_IGNORE:
|
if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND_IGNORE:
|
||||||
_LOGGER.debug("Remotec ZXT-120 Zwave Thermostat, ignoring")
|
_LOGGER.debug("Remotec ZXT-120 Zwave Thermostat, ignoring")
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
add_devices([ZWaveThermostat(value)])
|
add_devices([ZWaveThermostat(value)])
|
||||||
_LOGGER.debug("discovery_info=%s and zwave.NETWORK=%s",
|
_LOGGER.debug("discovery_info=%s and zwave.NETWORK=%s",
|
||||||
discovery_info, zwave.NETWORK)
|
discovery_info, zwave.NETWORK)
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=too-many-arguments
|
# pylint: disable=too-many-arguments
|
||||||
|
Loading…
x
Reference in New Issue
Block a user