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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user