mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
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:
parent
d7b757fb97
commit
e88e6d1030
@ -63,6 +63,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
node = zwave.NETWORK.nodes[discovery_info[ATTR_NODE_ID]]
|
node = zwave.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)
|
value.set_change_verified(False)
|
||||||
|
if value.index != 1: # Only add 1 device
|
||||||
|
return
|
||||||
add_devices([ZWaveClimate(value, temp_unit)])
|
add_devices([ZWaveClimate(value, temp_unit)])
|
||||||
_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)
|
||||||
@ -158,6 +160,17 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice):
|
|||||||
continue
|
continue
|
||||||
if self._zxt_120:
|
if self._zxt_120:
|
||||||
continue
|
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)
|
self._target_temperature = int(value.data)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -41,8 +41,8 @@ def setup(hass, config):
|
|||||||
('binary_sensor', pywink.get_sensors),
|
('binary_sensor', pywink.get_sensors),
|
||||||
('sensor', lambda: pywink.get_sensors or pywink.get_eggtrays),
|
('sensor', lambda: pywink.get_sensors or pywink.get_eggtrays),
|
||||||
('lock', pywink.get_locks),
|
('lock', pywink.get_locks),
|
||||||
('rollershutter', pywink.get_shades),
|
('cover', pywink.get_shades),
|
||||||
('garage_door', pywink.get_garage_doors)):
|
('cover', pywink.get_garage_doors)):
|
||||||
|
|
||||||
if func_exists():
|
if func_exists():
|
||||||
discovery.load_platform(hass, component_name, DOMAIN, {}, config)
|
discovery.load_platform(hass, component_name, DOMAIN, {}, config)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user