diff --git a/homeassistant/components/nibe_heatpump/climate.py b/homeassistant/components/nibe_heatpump/climate.py index 07cbd14144e3..b9d469da1965 100644 --- a/homeassistant/components/nibe_heatpump/climate.py +++ b/homeassistant/components/nibe_heatpump/climate.py @@ -13,12 +13,9 @@ from nibe.coil_groups import ( from nibe.exceptions import CoilNotFoundException from homeassistant.components.climate import ( - ATTR_HVAC_MODE, - ATTR_TARGET_TEMP_HIGH, - ATTR_TARGET_TEMP_LOW, - ATTR_TEMPERATURE, ClimateEntity, ClimateEntityFeature, + ClimateServiceArgument, HVACAction, HVACMode, ) @@ -205,9 +202,9 @@ class NibeClimateEntity(CoordinatorEntity[CoilCoordinator], ClimateEntity): async def async_set_temperature(self, **kwargs: Any) -> None: """Set target temperatures.""" coordinator = self.coordinator - hvac_mode = kwargs.get(ATTR_HVAC_MODE, self._attr_hvac_mode) + hvac_mode = kwargs.get(ClimateServiceArgument.HVAC_MODE, self._attr_hvac_mode) - if (temperature := kwargs.get(ATTR_TEMPERATURE)) is not None: + if (temperature := kwargs.get(ClimateServiceArgument.TEMPERATURE)) is not None: if hvac_mode == HVACMode.HEAT: await coordinator.async_write_coil( self._coil_setpoint_heat, temperature @@ -228,12 +225,15 @@ class NibeClimateEntity(CoordinatorEntity[CoilCoordinator], ClimateEntity): " 'heat' or 'cool'" ) - if (temperature := kwargs.get(ATTR_TARGET_TEMP_LOW)) is not None: + if ( + temperature := kwargs.get(ClimateServiceArgument.TARGET_TEMP_LOW) + ) is not None: await coordinator.async_write_coil(self._coil_setpoint_heat, temperature) if ( self._coil_setpoint_cool - and (temperature := kwargs.get(ATTR_TARGET_TEMP_HIGH)) is not None + and (temperature := kwargs.get(ClimateServiceArgument.TARGET_TEMP_HIGH)) + is not None ): await coordinator.async_write_coil(self._coil_setpoint_cool, temperature)