diff --git a/homeassistant/components/crownstone/light.py b/homeassistant/components/crownstone/light.py index de35ad3d508..a046a39cd62 100644 --- a/homeassistant/components/crownstone/light.py +++ b/homeassistant/components/crownstone/light.py @@ -9,12 +9,7 @@ from crownstone_cloud.const import DIMMING_ABILITY from crownstone_cloud.exceptions import CrownstoneAbilityError from crownstone_uart import CrownstoneUart -from homeassistant.components.light import ( - ATTR_BRIGHTNESS, - COLOR_MODE_BRIGHTNESS, - COLOR_MODE_ONOFF, - LightEntity, -) +from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError @@ -102,8 +97,8 @@ class CrownstoneEntity(CrownstoneBaseEntity, LightEntity): def color_mode(self) -> str: """Return the color mode of the light.""" if self.device.abilities.get(DIMMING_ABILITY).is_enabled: - return COLOR_MODE_BRIGHTNESS - return COLOR_MODE_ONOFF + return ColorMode.BRIGHTNESS + return ColorMode.ONOFF @property def supported_color_modes(self) -> set[str] | None: