diff --git a/custom_components/teslafi/switch.py b/custom_components/teslafi/switch.py index a754fcc..5043502 100644 --- a/custom_components/teslafi/switch.py +++ b/custom_components/teslafi/switch.py @@ -49,10 +49,12 @@ def _handle_coordinator_update(self) -> None: async def async_turn_on(self, **kwargs: Any) -> None: await self.entity_description.cmd(self.coordinator, True) + self._attr_is_on = True return self.async_write_ha_state() async def async_turn_off(self, **kwargs: Any) -> None: await self.entity_description.cmd(self.coordinator, False) + self._attr_is_on = False return self.async_write_ha_state()