diff --git a/homeassistant/components/liebherr/light.py b/homeassistant/components/liebherr/light.py index d5754dd11502..dced32416e68 100644 --- a/homeassistant/components/liebherr/light.py +++ b/homeassistant/components/liebherr/light.py @@ -10,7 +10,7 @@ from pyliebherrhomeapi.const import ( DEFAULT_PRESENTATION_LIGHT_MAX_BRIGHTNESS, ) -from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity +from homeassistant.components.light import ColorMode, LightEntity, LightServiceArgument from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -115,8 +115,10 @@ class LiebherrPresentationLight(LiebherrEntity, LightEntity): assert control is not None max_level = control.max or DEFAULT_PRESENTATION_LIGHT_MAX_BRIGHTNESS - if ATTR_BRIGHTNESS in kwargs: - target = max(1, round(kwargs[ATTR_BRIGHTNESS] * max_level / 255)) + if LightServiceArgument.BRIGHTNESS in kwargs: + target = max( + 1, round(kwargs[LightServiceArgument.BRIGHTNESS] * max_level / 255) + ) else: target = max_level