mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Add guard for missing xy color support in Matter light platform (#97251)
This commit is contained in:
parent
1a25b17c27
commit
ae33670b33
@ -337,10 +337,16 @@ class MatterLight(MatterEntity, LightEntity):
|
||||
# set current values
|
||||
|
||||
if self.supports_color:
|
||||
self._attr_color_mode = self._get_color_mode()
|
||||
if self._attr_color_mode == ColorMode.HS:
|
||||
self._attr_color_mode = color_mode = self._get_color_mode()
|
||||
if (
|
||||
ColorMode.HS in self._attr_supported_color_modes
|
||||
and color_mode == ColorMode.HS
|
||||
):
|
||||
self._attr_hs_color = self._get_hs_color()
|
||||
else:
|
||||
elif (
|
||||
ColorMode.XY in self._attr_supported_color_modes
|
||||
and color_mode == ColorMode.XY
|
||||
):
|
||||
self._attr_xy_color = self._get_xy_color()
|
||||
|
||||
if self.supports_color_temperature:
|
||||
|
Loading…
x
Reference in New Issue
Block a user