Zwave climate fix and wink cover. (#3205)

* Fixes setpoint get was done outside loop

* zxt_120

* Wink not migrated to cover

* Clarifying debug

* too long line

* Only add 1 device entity
This commit is contained in:
John Arild Berentsen 2016-09-07 03:34:28 +02:00 committed by Paulus Schoutsen
parent d7b757fb97
commit e88e6d1030
2 changed files with 15 additions and 2 deletions

View file

@ -63,6 +63,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
node = zwave.NETWORK.nodes[discovery_info[ATTR_NODE_ID]]
value = node.values[discovery_info[ATTR_VALUE_ID]]
value.set_change_verified(False)
if value.index != 1: # Only add 1 device
return
add_devices([ZWaveClimate(value, temp_unit)])
_LOGGER.debug("discovery_info=%s and zwave.NETWORK=%s",
discovery_info, zwave.NETWORK)
@ -158,6 +160,17 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice):
continue
if self._zxt_120:
continue
self._target_temperature = int(value.data)
_LOGGER.debug("Get setpoint value: SET_TEMP_TO_INDEX=%s and"
" self._current_operation=%s",
SET_TEMP_TO_INDEX.get(self._current_operation),
self._current_operation)
break
_LOGGER.debug("Get setpoint value not matching any "
"SET_TEMP_TO_INDEX=%s and "
"self._current_operation=%s. Using value.data=%s",
SET_TEMP_TO_INDEX.get(self._current_operation),
self._current_operation, int(value.data))
self._target_temperature = int(value.data)
@property

View file

@ -41,8 +41,8 @@ def setup(hass, config):
('binary_sensor', pywink.get_sensors),
('sensor', lambda: pywink.get_sensors or pywink.get_eggtrays),
('lock', pywink.get_locks),
('rollershutter', pywink.get_shades),
('garage_door', pywink.get_garage_doors)):
('cover', pywink.get_shades),
('cover', pywink.get_garage_doors)):
if func_exists():
discovery.load_platform(hass, component_name, DOMAIN, {}, config)