diff --git a/homeassistant/components/osram_infrared/light.py b/homeassistant/components/osram_infrared/light.py index 16f047675273..a634d25e1687 100644 --- a/homeassistant/components/osram_infrared/light.py +++ b/homeassistant/components/osram_infrared/light.py @@ -11,12 +11,11 @@ from homeassistant.components.infrared import ( InfraredReceiverConsumerEntity, ) from homeassistant.components.light import ( - ATTR_EFFECT, - ATTR_RGB_COLOR, EFFECT_OFF, ColorMode, LightEntity, LightEntityFeature, + LightServiceArgument, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback @@ -167,7 +166,7 @@ class OsramIrLight(OsramIrEmitterEntity, LightEntity): @override async def async_turn_on(self, **kwargs: Any) -> None: """Turn on the light and apply optional effect and color.""" - effect = kwargs.get(ATTR_EFFECT) + effect = kwargs.get(LightServiceArgument.EFFECT) if effect is not None and effect not in EFFECT_LIST: raise ServiceValidationError(f"Unsupported OSRAM infrared effect: {effect}") @@ -179,7 +178,7 @@ class OsramIrLight(OsramIrEmitterEntity, LightEntity): if effect is not None: await self._async_set_effect(effect) - elif (rgb_color := kwargs.get(ATTR_RGB_COLOR)) is not None: + elif (rgb_color := kwargs.get(LightServiceArgument.RGB_COLOR)) is not None: await self._async_set_rgb_color(rgb_color) self._attr_is_on = True