Fix colormode attribute on grouped Hue light (#113071)

pull/113250/head
Marcel van der Veldt 2024-03-11 19:04:44 +01:00 committed by Franck Nijhof
parent 66cd6c0d23
commit 0b2322c466
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 1 additions and 4 deletions

View File

@ -269,10 +269,7 @@ class GroupedHueLight(HueBaseEntity, LightEntity):
self._dynamic_mode_active = lights_in_dynamic_mode > 0
self._attr_supported_color_modes = supported_color_modes
# pick a winner for the current colormode
if (
lights_with_color_temp_support > 0
and lights_in_colortemp_mode == lights_with_color_temp_support
):
if lights_with_color_temp_support > 0 and lights_in_colortemp_mode > 0:
self._attr_color_mode = ColorMode.COLOR_TEMP
elif lights_with_color_support > 0:
self._attr_color_mode = ColorMode.XY