mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 14:45:09 +02:00
Add optimistic Guardian switch updating (#37141)
This commit is contained in:
@@ -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()
|
||||||
|
Reference in New Issue
Block a user