From 6409574ecfca307b0a41d44961e5c57e1c012560 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 28 Jan 2026 11:20:57 +0100 Subject: [PATCH] Improve flux_led light type hints (#161760) --- homeassistant/components/flux_led/light.py | 3 ++- homeassistant/components/flux_led/util.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/flux_led/light.py b/homeassistant/components/flux_led/light.py index 79dae33a2a5..4433ea20962 100644 --- a/homeassistant/components/flux_led/light.py +++ b/homeassistant/components/flux_led/light.py @@ -19,6 +19,7 @@ from homeassistant.components.light import ( ATTR_RGBW_COLOR, ATTR_RGBWW_COLOR, ATTR_WHITE, + ColorMode, LightEntity, LightEntityFeature, ) @@ -235,7 +236,7 @@ class FluxLight( return self._device.rgbcw @property - def color_mode(self) -> str: + def color_mode(self) -> ColorMode: """Return the color mode of the light.""" return _flux_color_mode_to_hass( self._device.color_mode, self._device.color_modes diff --git a/homeassistant/components/flux_led/util.py b/homeassistant/components/flux_led/util.py index 2691b841952..3ccade0b9d2 100644 --- a/homeassistant/components/flux_led/util.py +++ b/homeassistant/components/flux_led/util.py @@ -11,7 +11,7 @@ from homeassistant.util.color import color_hsv_to_RGB, color_RGB_to_hsv from .const import FLUX_COLOR_MODE_TO_HASS, MIN_RGB_BRIGHTNESS -def _hass_color_modes(device: AIOWifiLedBulb) -> set[str]: +def _hass_color_modes(device: AIOWifiLedBulb) -> set[ColorMode]: color_modes = device.color_modes if not color_modes: return {ColorMode.ONOFF}