From d37a5cdde5fcd5d54219e60aee226e80d112b582 Mon Sep 17 00:00:00 2001 From: Xiaonan Shen Date: Wed, 15 Jul 2020 21:51:33 +0800 Subject: [PATCH] Fix yeelight flash (#37743) * Fix yeelight flash * Use cast instead of string comparison Co-authored-by: Franck Nijhof Co-authored-by: Franck Nijhof --- homeassistant/components/yeelight/light.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py index fef6857a384..793af380db9 100644 --- a/homeassistant/components/yeelight/light.py +++ b/homeassistant/components/yeelight/light.py @@ -651,7 +651,7 @@ class YeelightGenericLight(LightEntity): def set_flash(self, flash) -> None: """Activate 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") return