Use the action field enums in ouman_eh_800 (#196060)

This commit is contained in:
epenet
2026-12-02 16:53:38 +02:00
committed by GitHub
parent a8234324f4
commit e0d725535e
@@ -15,14 +15,14 @@ from ouman_eh_800_api import (
)
from homeassistant.components.climate import (
ATTR_HVAC_MODE,
ClimateEntity,
ClimateEntityDescription,
ClimateEntityFeature,
ClimateServiceArgument,
HVACAction,
HVACMode,
)
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
from homeassistant.const import UnitOfTemperature
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
@@ -183,11 +183,11 @@ class OumanEh800ClimateEntity(OumanEh800Entity, ClimateEntity):
@override
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set a new room temperature setpoint and optionally the HVAC mode."""
if (hvac_mode := kwargs.get(ATTR_HVAC_MODE)) is not None:
if (hvac_mode := kwargs.get(ClimateServiceArgument.HVAC_MODE)) is not None:
await self.async_set_hvac_mode(hvac_mode)
await self.coordinator.async_set_endpoint_value(
self.entity_description.target_temperature_endpoint,
kwargs[ATTR_TEMPERATURE],
kwargs[ClimateServiceArgument.TEMPERATURE],
)
@override