mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in modbus (#196010)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user