From 3cc39ab63a1e826f1ede0c27cdcc45d7b9c5624a Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Tue, 4 Jan 2022 14:33:42 +0100 Subject: [PATCH] fix typo in check for color temperature --- homeassistant/components/hue/v2/group.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/hue/v2/group.py b/homeassistant/components/hue/v2/group.py index b8fdb0b0b1d285..835f90d3f6f064 100644 --- a/homeassistant/components/hue/v2/group.py +++ b/homeassistant/components/hue/v2/group.py @@ -298,7 +298,10 @@ def _update_values(self) -> None: supported_color_modes.add(COLOR_MODE_ONOFF) self._attr_supported_color_modes = supported_color_modes # pick a winner for the current colormode - if lights_in_colortemp_mode == lights_with_color_temp_support: + if ( + lights_with_color_temp_support > 0 + and lights_in_colortemp_mode == lights_with_color_temp_support + ): self._attr_color_mode = COLOR_MODE_COLOR_TEMP elif lights_with_color_support > 0: self._attr_color_mode = COLOR_MODE_XY