mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in plugwise (#196065)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user