mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 19:57:03 -04:00
Use the action field enums in izone (#195810)
This commit is contained in:
@@ -18,14 +18,10 @@ from homeassistant.components.climate import (
|
||||
PRESET_NONE,
|
||||
ClimateEntity,
|
||||
ClimateEntityFeature,
|
||||
ClimateServiceArgument,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_TEMPERATURE,
|
||||
PRECISION_HALVES,
|
||||
PRECISION_TENTHS,
|
||||
UnitOfTemperature,
|
||||
)
|
||||
from homeassistant.const import PRECISION_HALVES, PRECISION_TENTHS, UnitOfTemperature
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import ServiceValidationError
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
@@ -366,7 +362,7 @@ class ControllerDevice(IZoneCoordinatorEntity, ClimateEntity):
|
||||
@override
|
||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new target temperature."""
|
||||
if (temp := kwargs.get(ATTR_TEMPERATURE)) is not None:
|
||||
if (temp := kwargs.get(ClimateServiceArgument.TEMPERATURE)) is not None:
|
||||
temp = _normalize_setpoint(temp)
|
||||
await self._async_run_and_update(self.controller.set_temp_setpoint(temp))
|
||||
|
||||
@@ -524,7 +520,7 @@ class ZoneDevice(IZoneCoordinatorEntity, ClimateEntity):
|
||||
@override
|
||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new target temperature."""
|
||||
if (temp := kwargs.get(ATTR_TEMPERATURE)) is not None:
|
||||
if (temp := kwargs.get(ClimateServiceArgument.TEMPERATURE)) is not None:
|
||||
temp = _normalize_setpoint(temp)
|
||||
await self._async_run_and_update(self._zone.set_temp_setpoint(temp))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user