1
mirror of https://github.com/home-assistant/core synced 2024-09-25 00:41:32 +02:00

Fix invalid ColorMode on (some) 3rd party Hue Color lights (#97263)

This commit is contained in:
Marcel van der Veldt 2023-07-26 16:43:02 +02:00 committed by GitHub
parent 2ae059d4fc
commit 94870f05ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,7 +123,7 @@ class HueLight(HueBaseEntity, LightEntity):
"""Return the color mode of the light."""
if color_temp := self.resource.color_temperature:
# Hue lights return `mired_valid` to indicate CT is active
if color_temp.mirek_valid and color_temp.mirek is not None:
if color_temp.mirek is not None:
return ColorMode.COLOR_TEMP
if self.resource.supports_color:
return ColorMode.XY