mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Yeelight add state check to set_mode service (#59884)
This commit is contained in:
parent
1ecd9c9459
commit
05eb2f3e5c
@ -842,6 +842,7 @@ class YeelightGenericLight(YeelightEntity, LightEntity):
|
|||||||
async def async_set_mode(self, mode: str):
|
async def async_set_mode(self, mode: str):
|
||||||
"""Set a power mode."""
|
"""Set a power mode."""
|
||||||
await self._bulb.async_set_power_mode(PowerMode[mode.upper()])
|
await self._bulb.async_set_power_mode(PowerMode[mode.upper()])
|
||||||
|
self._async_schedule_state_check(True)
|
||||||
|
|
||||||
@_async_cmd
|
@_async_cmd
|
||||||
async def async_start_flow(self, transitions, count=0, action=ACTION_RECOVER):
|
async def async_start_flow(self, transitions, count=0, action=ACTION_RECOVER):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user