mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Add optimistic Guardian switch updating (#37141)
This commit is contained in:
parent
76db2b39b0
commit
3a2d4ac7fa
@ -70,6 +70,7 @@ class GuardianSwitch(GuardianEntity, SwitchEntity):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self._is_on = False
|
self._is_on = False
|
||||||
|
self.async_write_ha_state()
|
||||||
|
|
||||||
async def async_turn_on(self, **kwargs) -> None:
|
async def async_turn_on(self, **kwargs) -> None:
|
||||||
"""Turn the valve on (open)."""
|
"""Turn the valve on (open)."""
|
||||||
@ -81,3 +82,4 @@ class GuardianSwitch(GuardianEntity, SwitchEntity):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self._is_on = True
|
self._is_on = True
|
||||||
|
self.async_write_ha_state()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user