diff --git a/homeassistant/components/upb/light.py b/homeassistant/components/upb/light.py index 609bf0f0e32..2ba9f8ad8ad 100644 --- a/homeassistant/components/upb/light.py +++ b/homeassistant/components/upb/light.py @@ -3,10 +3,9 @@ from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_FLASH, ATTR_TRANSITION, - COLOR_MODE_BRIGHTNESS, - COLOR_MODE_ONOFF, SUPPORT_FLASH, SUPPORT_TRANSITION, + ColorMode, LightEntity, ) from homeassistant.config_entries import ConfigEntry @@ -57,11 +56,11 @@ class UpbLight(UpbAttachedEntity, LightEntity): self._brightness = self._element.status @property - def color_mode(self) -> str: + def color_mode(self) -> ColorMode: """Return the color mode of the light.""" if self._element.dimmable: - return COLOR_MODE_BRIGHTNESS - return COLOR_MODE_ONOFF + return ColorMode.BRIGHTNESS + return ColorMode.ONOFF @property def supported_color_modes(self) -> set[str]: