Use the action field enums in modbus (#196010)

This commit is contained in:
epenet
2026-12-02 13:17:06 +00:00
committed by GitHub
parent 5615da22d6
commit 85033b7e52
+2 -2
View File
@@ -20,12 +20,12 @@ from homeassistant.components.climate import (
SWING_ON,
SWING_VERTICAL,
ClimateEntityFeature,
ClimateServiceArgument,
HVACAction,
HVACMode,
RestoreClimate,
)
from homeassistant.const import (
ATTR_TEMPERATURE,
CONF_ADDRESS,
CONF_NAME,
CONF_TEMPERATURE_UNIT,
@@ -426,7 +426,7 @@ class ModbusThermostat(ModbusStructEntity, RestoreClimate):
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
target_temperature = (
float(kwargs[ATTR_TEMPERATURE]) - self._target_temp_offset
float(kwargs[ClimateServiceArgument.TEMPERATURE]) - self._target_temp_offset
) / self._target_temp_scale
if self._data_type in (
DataType.INT16,