Use the action field enums in huum (#195775)

This commit is contained in:
epenet
2026-12-01 10:25:31 +00:00
committed by GitHub
parent 87d0f33b06
commit 22b4da549d
+3 -2
View File
@@ -7,9 +7,10 @@ from huum.const import SaunaStatus
from homeassistant.components.climate import (
ClimateEntity,
ClimateEntityFeature,
ClimateServiceArgument,
HVACMode,
)
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_WHOLE, UnitOfTemperature
from homeassistant.const import PRECISION_WHOLE, UnitOfTemperature
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
@@ -104,7 +105,7 @@ class HuumDevice(HuumBaseEntity, ClimateEntity):
@huum_exception_handler
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
temperature = kwargs.get(ATTR_TEMPERATURE)
temperature = kwargs.get(ClimateServiceArgument.TEMPERATURE)
if temperature is None or self.hvac_mode != HVACMode.HEAT:
return
temperature = int(temperature)