From 360af7451926e5467d1ba89aa8fa4bb31f82246e Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 28 Jan 2026 19:53:57 +0100 Subject: [PATCH] Improve min/max kelvin handling in hue_ble (#161782) --- homeassistant/components/hue_ble/light.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/hue_ble/light.py b/homeassistant/components/hue_ble/light.py index 18ab878acdf..9302ec7349b 100644 --- a/homeassistant/components/hue_ble/light.py +++ b/homeassistant/components/hue_ble/light.py @@ -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)},