Преглед на файлове

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
Jason Rumney преди 1 година
родител
ревизия
dfd5a07144
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      custom_components/tuya_local/light.py

+ 1 - 1
custom_components/tuya_local/light.py

@@ -129,7 +129,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
     @property
     @property
     def color_temp_kelvin(self):
     def color_temp_kelvin(self):
         """Return the color temperature in kelvin."""
         """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)
             return self._color_temp_dps.get_value(self._device)
 
 
     @property
     @property