diff --git a/homeassistant/components/mystrom/light.py b/homeassistant/components/mystrom/light.py index 8c9a4fa4cc59..300ea3df01c8 100644 --- a/homeassistant/components/mystrom/light.py +++ b/homeassistant/components/mystrom/light.py @@ -6,12 +6,10 @@ from typing import Any, override from pymystrom.exceptions import MyStromConnectionError from homeassistant.components.light import ( - ATTR_BRIGHTNESS, - ATTR_EFFECT, - ATTR_HS_COLOR, ColorMode, LightEntity, LightEntityFeature, + LightServiceArgument, ) from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError @@ -67,12 +65,12 @@ class MyStromLight(LightEntity): @override async def async_turn_on(self, **kwargs: Any) -> None: """Turn on the light.""" - brightness = kwargs.get(ATTR_BRIGHTNESS, 255) - effect = kwargs.get(ATTR_EFFECT) + brightness = kwargs.get(LightServiceArgument.BRIGHTNESS, 255) + effect = kwargs.get(LightServiceArgument.EFFECT) - if ATTR_HS_COLOR in kwargs: - color_h, color_s = kwargs[ATTR_HS_COLOR] - elif ATTR_BRIGHTNESS in kwargs: + if LightServiceArgument.HS_COLOR in kwargs: + color_h, color_s = kwargs[LightServiceArgument.HS_COLOR] + elif LightServiceArgument.BRIGHTNESS in kwargs: # Brightness update, keep color if self.hs_color is not None: color_h, color_s = self.hs_color