From ed7ea1423a08eb56a41455c620be6438f54b1ca9 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Tue, 28 Jun 2022 15:53:00 +0200 Subject: [PATCH] Fix ZHA color mode not being set correctly when changing light state (#74018) --- homeassistant/components/zha/light.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/zha/light.py b/homeassistant/components/zha/light.py index 7c9e8d738a4..2f3379fa6b1 100644 --- a/homeassistant/components/zha/light.py +++ b/homeassistant/components/zha/light.py @@ -262,6 +262,7 @@ class BaseLight(LogMixin, light.LightEntity): if isinstance(result, Exception) or result[1] is not Status.SUCCESS: self.debug("turned on: %s", t_log) return + self._color_mode = ColorMode.COLOR_TEMP self._color_temp = temperature self._hs_color = None @@ -275,6 +276,7 @@ class BaseLight(LogMixin, light.LightEntity): if isinstance(result, Exception) or result[1] is not Status.SUCCESS: self.debug("turned on: %s", t_log) return + self._color_mode = ColorMode.HS self._hs_color = hs_color self._color_temp = None