Fix physical manual update of state of device (#2372)

This commit is contained in:
John Arild Berentsen 2016-06-25 08:22:14 +02:00 committed by Paulus Schoutsen
parent cbb897b2cf
commit a1ef1c996c
4 changed files with 5 additions and 5 deletions

View File

@ -51,7 +51,7 @@ class ZwaveGarageDoor(zwave.ZWaveDeviceEntity, GarageDoorDevice):
def value_changed(self, value): def value_changed(self, value):
"""Called when a value has changed on the network.""" """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._state = value.data
self.update_ha_state(True) self.update_ha_state(True)
_LOGGER.debug("Value changed on network %s", value) _LOGGER.debug("Value changed on network %s", value)
@ -59,7 +59,7 @@ class ZwaveGarageDoor(zwave.ZWaveDeviceEntity, GarageDoorDevice):
@property @property
def is_closed(self): def is_closed(self):
"""Return the current position of Zwave garage door.""" """Return the current position of Zwave garage door."""
return self._state return not self._state
def close_door(self): def close_door(self):
"""Close the garage door.""" """Close the garage door."""

View File

@ -98,7 +98,7 @@ class ZWaveHvac(ZWaveDeviceEntity, HvacDevice):
def value_changed(self, value): def value_changed(self, value):
"""Called when a value has changed on the network.""" """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_properties()
self.update_ha_state(True) self.update_ha_state(True)
_LOGGER.debug("Value changed on network %s", value) _LOGGER.debug("Value changed on network %s", value)

View File

@ -49,7 +49,7 @@ class ZwaveRollershutter(zwave.ZWaveDeviceEntity, RollershutterDevice):
def value_changed(self, value): def value_changed(self, value):
"""Called when a value has changed on the network.""" """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) self.update_ha_state(True)
_LOGGER.debug("Value changed on network %s", value) _LOGGER.debug("Value changed on network %s", value)

View File

@ -81,7 +81,7 @@ class ZWaveThermostat(zwave.ZWaveDeviceEntity, ThermostatDevice):
def value_changed(self, value): def value_changed(self, value):
"""Called when a value has changed on the network.""" """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_properties()
self.update_ha_state() self.update_ha_state()