1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Adjust openrgb default color mode handling (#162650)

This commit is contained in:
epenet
2026-02-09 16:00:44 +01:00
committed by GitHub
parent 5c4d9f4ca4
commit 27d6ae2881

View File

@@ -158,7 +158,7 @@ class OpenRGBLight(CoordinatorEntity[OpenRGBCoordinator], LightEntity):
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
@@ -194,8 +194,8 @@ class OpenRGBLight(CoordinatorEntity[OpenRGBCoordinator], LightEntity):
# 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
if self._attr_brightness is not None and self._attr_brightness != brightness: