From c665a844d6764ff36f447c8002f97c5ee1434683 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 9 Feb 2026 13:56:14 +0000 Subject: [PATCH] Tweak --- homeassistant/components/deako/light.py | 5 +---- homeassistant/components/matter/light.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/deako/light.py b/homeassistant/components/deako/light.py index 12f42c36f29..c27f17767c3 100644 --- a/homeassistant/components/deako/light.py +++ b/homeassistant/components/deako/light.py @@ -89,8 +89,5 @@ class DeakoLightEntity(LightEntity): assert self._attr_unique_id is not None state = self.client.get_state(self._attr_unique_id) or {} self._attr_is_on = bool(state.get("power", False)) - if ( - self._attr_supported_color_modes is not None - and ColorMode.BRIGHTNESS in self._attr_supported_color_modes - ): + if ColorMode.BRIGHTNESS in self._attr_supported_color_modes: self._attr_brightness = int(round(state.get("dim", 0) * 2.55)) diff --git a/homeassistant/components/matter/light.py b/homeassistant/components/matter/light.py index 6a8e262df17..68aaaa775da 100644 --- a/homeassistant/components/matter/light.py +++ b/homeassistant/components/matter/light.py @@ -332,7 +332,7 @@ class MatterLight(MatterEntity, LightEntity): @callback def _update_from_device(self) -> None: """Update from device.""" - if self._attr_supported_color_modes is None: + if not hasattr(self, "_attr_supported_color_modes"): # work out what (color)features are supported supported_color_modes = {ColorMode.ONOFF} # brightness support