From 286ffb2d717c694cffb6973ea2b8bbd66bfad896 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 5 Oct 2021 14:49:42 -1000 Subject: [PATCH] Write flux_led state after turning on/off (#57152) --- homeassistant/components/flux_led/light.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/flux_led/light.py b/homeassistant/components/flux_led/light.py index 581d5fbaab6..a480a956a58 100644 --- a/homeassistant/components/flux_led/light.py +++ b/homeassistant/components/flux_led/light.py @@ -355,6 +355,7 @@ class FluxLight(CoordinatorEntity, LightEntity): async def async_turn_on(self, **kwargs: Any) -> None: """Turn the specified or all lights on.""" await self.hass.async_add_executor_job(partial(self._turn_on, **kwargs)) + self.async_write_ha_state() await self.coordinator.async_request_refresh() def _turn_on(self, **kwargs: Any) -> None: @@ -446,6 +447,7 @@ class FluxLight(CoordinatorEntity, LightEntity): async def async_turn_off(self, **kwargs: Any) -> None: """Turn the specified or all lights off.""" await self.hass.async_add_executor_job(self._bulb.turnOff) + self.async_write_ha_state() await self.coordinator.async_request_refresh() async def async_added_to_hass(self) -> None: