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 Franck Nijhof
parent a830a14342
commit f719a14537
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

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)