From dfd5a07144a5562fb7c9438821a06a6a8bcd5591 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 26 Nov 2024 18:46:46 +0900 Subject: [PATCH] light: return None for color_temp when in HS mode. When the light is in RGB mode, returning the color temperature from the light causes HA to filter out any changes TO that color_mode, so the light does not switch from RGB to color_temp mode when it should. Issue #2552 --- custom_components/tuya_local/light.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/light.py b/custom_components/tuya_local/light.py index 69139e8fd7..f321f46417 100644 --- a/custom_components/tuya_local/light.py +++ b/custom_components/tuya_local/light.py @@ -129,7 +129,7 @@ def raw_color_mode(self): @property def color_temp_kelvin(self): """Return the color temperature in kelvin.""" - if self._color_temp_dps: + if self._color_temp_dps and self.color_mode != ColorMode.HS: return self._color_temp_dps.get_value(self._device) @property