mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
[Zwave] Update HA state on value change
This commit is contained in:
parent
877926cfee
commit
56c5d345a4
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user