Add optimistic Guardian switch updating (#37141)
This commit is contained in:
1 parent
76db2b39b0
commit
3a2d4ac7fa
1 file changed
+2
@@ -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