Use the action field enums in plugwise (#196065)

This commit is contained in:
epenet
2026-12-02 16:27:49 +01:00
committed by GitHub
parent c0c656f910
commit e305d8b9cd
@@ -9,8 +9,9 @@ from homeassistant.components.water_heater import (
WaterHeaterEntity,
WaterHeaterEntityDescription,
WaterHeaterEntityFeature,
WaterHeaterServiceArgument,
)
from homeassistant.const import ATTR_TEMPERATURE, STATE_OFF, UnitOfTemperature
from homeassistant.const import STATE_OFF, UnitOfTemperature
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
@@ -133,7 +134,7 @@ class PlugwiseWaterHeaterEntity(PlugwiseEntity, WaterHeaterEntity):
@override
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
temperature = float(kwargs[ATTR_TEMPERATURE])
temperature = float(kwargs[WaterHeaterServiceArgument.TEMPERATURE])
if temperature < self._attr_min_temp or temperature > self._attr_max_temp:
temperature_unit = self.hass.config.units.temperature_unit
raise HomeAssistantError(