diff --git a/homeassistant/components/decora_wifi/light.py b/homeassistant/components/decora_wifi/light.py index 922a4937ea3..7d3b1e353e2 100644 --- a/homeassistant/components/decora_wifi/light.py +++ b/homeassistant/components/decora_wifi/light.py @@ -14,9 +14,8 @@ from homeassistant.components import persistent_notification from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_TRANSITION, - COLOR_MODE_BRIGHTNESS, - COLOR_MODE_ONOFF, PLATFORM_SCHEMA, + ColorMode, LightEntity, LightEntityFeature, ) @@ -103,8 +102,8 @@ class DecoraWifiLight(LightEntity): def color_mode(self) -> str: """Return the color mode of the light.""" if self._switch.canSetLevel: - return COLOR_MODE_BRIGHTNESS - return COLOR_MODE_ONOFF + return ColorMode.BRIGHTNESS + return ColorMode.ONOFF @property def supported_color_modes(self) -> set[str] | None: