Exit when command_classes are missing thermostat Zwave (#2824)

pull/2828/head
John Arild Berentsen 2016-08-16 07:13:49 +02:00 committed by Paulus Schoutsen
parent 9afb1d8c0d
commit 27e27ee156
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,11 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND_IGNORE:
_LOGGER.debug("Remotec ZXT-120 Zwave Thermostat, ignoring")
return
if not (value.node.get_values_for_command_class(
COMMAND_CLASS_SENSOR_MULTILEVEL) and
value.node.get_values_for_command_class(
COMMAND_CLASS_THERMOSTAT_SETPOINT)):
return
add_devices([ZWaveThermostat(value)])
_LOGGER.debug("discovery_info=%s and zwave.NETWORK=%s",