Yeelight add state check to set_mode service (#59884)

This commit is contained in:
starkillerOG 2021-11-18 22:52:57 +01:00 committed by GitHub
parent 1ecd9c9459
commit 05eb2f3e5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -842,6 +842,7 @@ class YeelightGenericLight(YeelightEntity, LightEntity):
async def async_set_mode(self, mode: str):
"""Set a power mode."""
await self._bulb.async_set_power_mode(PowerMode[mode.upper()])
self._async_schedule_state_check(True)
@_async_cmd
async def async_start_flow(self, transitions, count=0, action=ACTION_RECOVER):