From a1ef1c996cb86242e8ec837ecb0a9832c9318e96 Mon Sep 17 00:00:00 2001 From: John Arild Berentsen Date: Sat, 25 Jun 2016 08:22:14 +0200 Subject: [PATCH] Fix physical manual update of state of device (#2372) --- homeassistant/components/garage_door/zwave.py | 4 ++-- homeassistant/components/hvac/zwave.py | 2 +- homeassistant/components/rollershutter/zwave.py | 2 +- homeassistant/components/thermostat/zwave.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/garage_door/zwave.py b/homeassistant/components/garage_door/zwave.py index 18a2ea96b86..b527fc0052c 100644 --- a/homeassistant/components/garage_door/zwave.py +++ b/homeassistant/components/garage_door/zwave.py @@ -51,7 +51,7 @@ class ZwaveGarageDoor(zwave.ZWaveDeviceEntity, GarageDoorDevice): def value_changed(self, value): """Called when a value has changed on the network.""" - if self._value.node == value.node: + if self._value.value_id == value.value_id: self._state = value.data self.update_ha_state(True) _LOGGER.debug("Value changed on network %s", value) @@ -59,7 +59,7 @@ class ZwaveGarageDoor(zwave.ZWaveDeviceEntity, GarageDoorDevice): @property def is_closed(self): """Return the current position of Zwave garage door.""" - return self._state + return not self._state def close_door(self): """Close the garage door.""" diff --git a/homeassistant/components/hvac/zwave.py b/homeassistant/components/hvac/zwave.py index c950200932a..2a9c0726f92 100755 --- a/homeassistant/components/hvac/zwave.py +++ b/homeassistant/components/hvac/zwave.py @@ -98,7 +98,7 @@ class ZWaveHvac(ZWaveDeviceEntity, HvacDevice): def value_changed(self, value): """Called when a value has changed on the network.""" - if self._value.node == value.node: + if self._value.value_id == value.value_id: self.update_properties() self.update_ha_state(True) _LOGGER.debug("Value changed on network %s", value) diff --git a/homeassistant/components/rollershutter/zwave.py b/homeassistant/components/rollershutter/zwave.py index 288488fe057..ea0be0ddf74 100644 --- a/homeassistant/components/rollershutter/zwave.py +++ b/homeassistant/components/rollershutter/zwave.py @@ -49,7 +49,7 @@ class ZwaveRollershutter(zwave.ZWaveDeviceEntity, RollershutterDevice): def value_changed(self, value): """Called when a value has changed on the network.""" - if self._value.node == value.node: + if self._value.value_id == value.value_id: self.update_ha_state(True) _LOGGER.debug("Value changed on network %s", value) diff --git a/homeassistant/components/thermostat/zwave.py b/homeassistant/components/thermostat/zwave.py index 8d7e36cc2aa..ed653874af2 100644 --- a/homeassistant/components/thermostat/zwave.py +++ b/homeassistant/components/thermostat/zwave.py @@ -81,7 +81,7 @@ class ZWaveThermostat(zwave.ZWaveDeviceEntity, ThermostatDevice): def value_changed(self, value): """Called when a value has changed on the network.""" - if self._value.node == value.node: + if self._value.value_id == value.value_id: self.update_properties() self.update_ha_state()