mirror of
https://github.com/home-assistant/core.git
synced 2026-12-03 04:08:19 -04:00
Use the action field enums in ecobee (#195615)
This commit is contained in:
@@ -4,8 +4,6 @@ import collections
|
||||
from typing import Any, override
|
||||
|
||||
from homeassistant.components.climate import (
|
||||
ATTR_TARGET_TEMP_HIGH,
|
||||
ATTR_TARGET_TEMP_LOW,
|
||||
FAN_AUTO,
|
||||
FAN_ON,
|
||||
PRESET_AWAY,
|
||||
@@ -14,11 +12,11 @@ from homeassistant.components.climate import (
|
||||
PRESET_SLEEP,
|
||||
ClimateEntity,
|
||||
ClimateEntityFeature,
|
||||
ClimateServiceArgument,
|
||||
HVACAction,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_TEMPERATURE,
|
||||
PRECISION_HALVES,
|
||||
PRECISION_TENTHS,
|
||||
STATE_OFF,
|
||||
@@ -629,9 +627,9 @@ class Thermostat(ClimateEntity):
|
||||
@override
|
||||
def set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new target temperature."""
|
||||
low_temp = kwargs.get(ATTR_TARGET_TEMP_LOW)
|
||||
high_temp = kwargs.get(ATTR_TARGET_TEMP_HIGH)
|
||||
temp = kwargs.get(ATTR_TEMPERATURE)
|
||||
low_temp = kwargs.get(ClimateServiceArgument.TARGET_TEMP_LOW)
|
||||
high_temp = kwargs.get(ClimateServiceArgument.TARGET_TEMP_HIGH)
|
||||
temp = kwargs.get(ClimateServiceArgument.TEMPERATURE)
|
||||
|
||||
if self.hvac_mode == HVACMode.HEAT_COOL and (
|
||||
low_temp is not None or high_temp is not None
|
||||
|
||||
Reference in New Issue
Block a user