mirror of
https://github.com/home-assistant/core.git
synced 2025-08-17 19:41:45 +02: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:
@@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user