mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
Fix yeelight flash (#37743)
* Fix yeelight flash * Use cast instead of string comparison Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
a3174a88f5
commit
d37a5cdde5
@ -651,7 +651,7 @@ class YeelightGenericLight(LightEntity):
|
|||||||
def set_flash(self, flash) -> None:
|
def set_flash(self, flash) -> None:
|
||||||
"""Activate flash."""
|
"""Activate flash."""
|
||||||
if flash:
|
if flash:
|
||||||
if self._bulb.last_properties["color_mode"] != 1:
|
if int(self._bulb.last_properties["color_mode"]) != 1:
|
||||||
_LOGGER.error("Flash supported currently only in RGB mode")
|
_LOGGER.error("Flash supported currently only in RGB mode")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user