mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix ESPHome climate preset mode refactor (#27637)
Fixes https://github.com/home-assistant/home-assistant/issues/25613
This commit is contained in:
parent
de7963544f
commit
09de6d5889
@ -17,6 +17,7 @@ from homeassistant.components.climate.const import (
|
|||||||
SUPPORT_TARGET_TEMPERATURE_RANGE,
|
SUPPORT_TARGET_TEMPERATURE_RANGE,
|
||||||
PRESET_AWAY,
|
PRESET_AWAY,
|
||||||
HVAC_MODE_OFF,
|
HVAC_MODE_OFF,
|
||||||
|
PRESET_HOME,
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_TEMPERATURE,
|
ATTR_TEMPERATURE,
|
||||||
@ -96,7 +97,7 @@ class EsphomeClimateDevice(EsphomeEntity, ClimateDevice):
|
|||||||
@property
|
@property
|
||||||
def preset_modes(self):
|
def preset_modes(self):
|
||||||
"""Return preset modes."""
|
"""Return preset modes."""
|
||||||
return [PRESET_AWAY] if self._static_info.supports_away else []
|
return [PRESET_AWAY, PRESET_HOME] if self._static_info.supports_away else []
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def target_temperature_step(self) -> float:
|
def target_temperature_step(self) -> float:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user