Skip to content

Commit

Permalink
light: return None for color_temp when in HS mode.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
make-all committed Nov 26, 2024
1 parent 7e02977 commit dfd5a07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/tuya_local/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dfd5a07

Please sign in to comment.