Use the action field enums in cielo_home (#195724)

This commit is contained in:
epenet
2026-12-01 06:52:35 +00:00
committed by GitHub
parent 5bb1e044c5
commit b04055d41e
@@ -7,13 +7,11 @@ from typing import Any, Concatenate, override
from cieloconnectapi.exceptions import AuthenticationError
from homeassistant.components.climate import (
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
ClimateEntity,
ClimateEntityFeature,
ClimateServiceArgument,
HVACMode,
)
from homeassistant.const import ATTR_TEMPERATURE
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed, HomeAssistantError
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
@@ -253,12 +251,12 @@ class CieloClimate(CieloDeviceEntity, ClimateEntity):
if self.hvac_mode == HVACMode.HEAT_COOL:
return await self.client.async_set_temperature(
self.native_temperature_unit,
target_temp_low=kwargs.get(ATTR_TARGET_TEMP_LOW),
target_temp_high=kwargs.get(ATTR_TARGET_TEMP_HIGH),
target_temp_low=kwargs.get(ClimateServiceArgument.TARGET_TEMP_LOW),
target_temp_high=kwargs.get(ClimateServiceArgument.TARGET_TEMP_HIGH),
)
return await self.client.async_set_temperature(
self.native_temperature_unit,
temperature=kwargs.get(ATTR_TEMPERATURE),
temperature=kwargs.get(ClimateServiceArgument.TEMPERATURE),
)
@async_handle_api_call