Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions homeassistant/components/openrgb/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _update_attrs(self) -> None:
else:
mode_supports_colors = check_if_mode_supports_color(mode_data)

color_mode = None
color_mode = ColorMode.UNKNOWN
rgb_color = None
brightness = None
on_by_color = True
Expand Down Expand Up @@ -194,8 +194,8 @@ def _update_attrs(self) -> None:
# If Off by color, retain previous color mode to avoid changing the UI
color_mode = self._attr_color_mode

if color_mode is None:
# If color mode is still None, default to RGB
if color_mode == ColorMode.UNKNOWN:
# If color mode is still unknown, default to RGB
color_mode = ColorMode.RGB
Comment on lines 161 to 199

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change adjusts the fallback from None to ColorMode.UNKNOWN, which affects the initial/off-by-color/off-by-mode paths. There is currently no test asserting that an OpenRGB light starting in Off mode (or Off-by-color) reports valid supported_color_modes (i.e., not including ColorMode.UNKNOWN) and doesn’t trigger light color mode validation warnings. Add a test case covering these states to prevent regressions.

Copilot generated this review using guidance from repository custom instructions.

if self._attr_brightness is not None and self._attr_brightness != brightness:
Expand Down
Loading