mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +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):
|
def turn_on(self, **kwargs):
|
||||||
""" Turn the device on. """
|
""" Turn the device on. """
|
||||||
if self._node.set_switch(self._value.value_id, True):
|
self._node.set_switch(self._value.value_id, True)
|
||||||
self._state = True
|
|
||||||
self.update_ha_state()
|
|
||||||
|
|
||||||
def turn_off(self, **kwargs):
|
def turn_off(self, **kwargs):
|
||||||
""" Turn the device off. """
|
""" Turn the device off. """
|
||||||
if self._node.set_switch(self._value.value_id, False):
|
self._node.set_switch(self._value.value_id, False)
|
||||||
self._state = False
|
|
||||||
self.update_ha_state()
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user