Read color temperature range from Matter device if supported (#122054)
This commit is contained in:
parent
1b6f880a27
commit
0aea9b0edb
1 changed files with 10 additions and 0 deletions
|
@ -357,6 +357,16 @@ class MatterLight(MatterEntity, LightEntity):
|
|||
):
|
||||
supported_color_modes.add(ColorMode.COLOR_TEMP)
|
||||
self._supports_color_temperature = True
|
||||
min_mireds = self.get_matter_attribute_value(
|
||||
clusters.ColorControl.Attributes.ColorTempPhysicalMinMireds
|
||||
)
|
||||
if min_mireds > 0:
|
||||
self._attr_min_mireds = min_mireds
|
||||
max_mireds = self.get_matter_attribute_value(
|
||||
clusters.ColorControl.Attributes.ColorTempPhysicalMaxMireds
|
||||
)
|
||||
if min_mireds > 0:
|
||||
self._attr_max_mireds = max_mireds
|
||||
|
||||
supported_color_modes = filter_supported_color_modes(supported_color_modes)
|
||||
self._attr_supported_color_modes = supported_color_modes
|
||||
|
|
Loading…
Add table
Reference in a new issue