[Zwave] Update HA state on value change

pull/593/head
Arthur Andersen 2015-11-10 20:04:47 +01:00
parent 877926cfee
commit 56c5d345a4
1 changed files with 2 additions and 6 deletions

View File

@ -69,12 +69,8 @@ class ZwaveSwitch(SwitchDevice):
def turn_on(self, **kwargs):
""" Turn the device on. """
if self._node.set_switch(self._value.value_id, True):
self._state = True
self.update_ha_state()
self._node.set_switch(self._value.value_id, True)
def turn_off(self, **kwargs):
""" Turn the device off. """
if self._node.set_switch(self._value.value_id, False):
self._state = False
self.update_ha_state()
self._node.set_switch(self._value.value_id, False)