mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Write flux_led state after turning on/off (#57152)
This commit is contained in:
parent
f6682ba99d
commit
286ffb2d71
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user