From e1ee7725618fbf0ee38632891f5af6a4977a3fd0 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 8 Jul 2026 11:18:00 +0200 Subject: [PATCH] Use LightEntityStateAttribute enum in LimitlessLED (#175938) Co-authored-by: Claude Opus 4.8 (1M context) --- homeassistant/components/limitlessled/light.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/limitlessled/light.py b/homeassistant/components/limitlessled/light.py index 14b7df583341..bd44820fde92 100644 --- a/homeassistant/components/limitlessled/light.py +++ b/homeassistant/components/limitlessled/light.py @@ -29,6 +29,7 @@ from homeassistant.components.light import ( ColorMode, LightEntity, LightEntityFeature, + LightEntityStateAttribute, ) from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT, CONF_TYPE, STATE_ON from homeassistant.core import HomeAssistant @@ -259,11 +260,15 @@ class LimitlessLEDGroup(LightEntity, RestoreEntity): await super().async_added_to_hass() if last_state := await self.async_get_last_state(): self._attr_is_on = last_state.state == STATE_ON - self._attr_brightness = last_state.attributes.get("brightness") + self._attr_brightness = last_state.attributes.get( + LightEntityStateAttribute.BRIGHTNESS + ) self._attr_color_temp_kelvin = last_state.attributes.get( - "color_temp_kelvin" + LightEntityStateAttribute.COLOR_TEMP_KELVIN + ) + self._attr_hs_color = last_state.attributes.get( + LightEntityStateAttribute.HS_COLOR ) - self._attr_hs_color = last_state.attributes.get("hs_color") @property @override