Handle deCONZ color temp 0 is never used when calculating kelvin CT (#134521)

This commit is contained in:
Robert Svensson 2025-01-03 10:51:20 +01:00 committed by GitHub
parent e15eda3aa2
commit fd12ae2ccd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,7 +266,7 @@ class DeconzBaseLight[_LightDeviceT: Group | Light](
@property
def color_temp_kelvin(self) -> int | None:
"""Return the CT color value."""
if self._device.color_temp is None:
if self._device.color_temp is None or self._device.color_temp == 0:
return None
return color_temperature_mired_to_kelvin(self._device.color_temp)