1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-08 17:49:37 +01:00

Improve min/max kelvin handling in hue_ble (#161782)

This commit is contained in:
epenet
2026-01-28 19:53:57 +01:00
committed by GitHub
parent d099ac457d
commit 360af74519
+8 -10
View File
@@ -63,16 +63,14 @@ class HueBLELight(LightEntity):
self._api = light
self._attr_unique_id = light.address
self._attr_min_color_temp_kelvin = (
color_util.color_temperature_mired_to_kelvin(light.maximum_mireds)
if light.maximum_mireds
else None
)
self._attr_max_color_temp_kelvin = (
color_util.color_temperature_mired_to_kelvin(light.minimum_mireds)
if light.minimum_mireds
else None
)
if light.maximum_mireds:
self._attr_min_color_temp_kelvin = (
color_util.color_temperature_mired_to_kelvin(light.maximum_mireds)
)
if light.minimum_mireds:
self._attr_max_color_temp_kelvin = (
color_util.color_temperature_mired_to_kelvin(light.minimum_mireds)
)
self._attr_device_info = DeviceInfo(
name=light.name,
connections={(CONNECTION_BLUETOOTH, light.address)},