diff --git a/homeassistant/components/lightwave/climate.py b/homeassistant/components/lightwave/climate.py index 65f5ea4d7554..a4456bb9ff51 100644 --- a/homeassistant/components/lightwave/climate.py +++ b/homeassistant/components/lightwave/climate.py @@ -7,10 +7,11 @@ from homeassistant.components.climate import ( DEFAULT_MIN_TEMP, ClimateEntity, ClimateEntityFeature, + ClimateServiceArgument, HVACAction, HVACMode, ) -from homeassistant.const import ATTR_TEMPERATURE, CONF_NAME, UnitOfTemperature +from homeassistant.const import CONF_NAME, UnitOfTemperature from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType @@ -103,8 +104,10 @@ class LightwaveTrv(ClimateEntity): @override def set_temperature(self, **kwargs: Any) -> None: """Set TRV target temperature.""" - if ATTR_TEMPERATURE in kwargs: - self._attr_native_target_temperature = kwargs[ATTR_TEMPERATURE] + if ClimateServiceArgument.TEMPERATURE in kwargs: + self._attr_native_target_temperature = kwargs[ + ClimateServiceArgument.TEMPERATURE + ] self._inhibit = self._attr_native_target_temperature self._lwlink.set_temperature( self._device_id, self._attr_native_target_temperature, self._attr_name diff --git a/homeassistant/components/lightwave/light.py b/homeassistant/components/lightwave/light.py index 749456ea12ab..0d0b80fb0c34 100644 --- a/homeassistant/components/lightwave/light.py +++ b/homeassistant/components/lightwave/light.py @@ -2,7 +2,7 @@ from typing import Any, override -from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity +from homeassistant.components.light import ColorMode, LightEntity, LightServiceArgument from homeassistant.const import CONF_NAME from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -52,8 +52,8 @@ class LWRFLight(LightEntity): """Turn the LightWave light on.""" self._attr_is_on = True - if ATTR_BRIGHTNESS in kwargs: - self._attr_brightness = kwargs[ATTR_BRIGHTNESS] + if LightServiceArgument.BRIGHTNESS in kwargs: + self._attr_brightness = kwargs[LightServiceArgument.BRIGHTNESS] if self._attr_brightness != MAX_BRIGHTNESS: self._lwlink.turn_on_with_brightness(