From 597118d584452888889a52767e2b18b19be08a7e Mon Sep 17 00:00:00 2001 From: Minims Date: Sat, 24 Feb 2024 20:17:22 +0100 Subject: [PATCH] Add ECO temp to Generic Thermostat (#110471) feat: add ECO temp to Generic Thermostat. --- homeassistant/components/generic_thermostat/climate.py | 2 ++ tests/components/generic_thermostat/test_climate.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/homeassistant/components/generic_thermostat/climate.py b/homeassistant/components/generic_thermostat/climate.py index 3a964204b70..64fde0dfd26 100644 --- a/homeassistant/components/generic_thermostat/climate.py +++ b/homeassistant/components/generic_thermostat/climate.py @@ -15,6 +15,7 @@ from homeassistant.components.climate import ( PRESET_ACTIVITY, PRESET_AWAY, PRESET_COMFORT, + PRESET_ECO, PRESET_HOME, PRESET_NONE, PRESET_SLEEP, @@ -86,6 +87,7 @@ CONF_PRESETS = { for p in ( PRESET_AWAY, PRESET_COMFORT, + PRESET_ECO, PRESET_HOME, PRESET_SLEEP, PRESET_ACTIVITY, diff --git a/tests/components/generic_thermostat/test_climate.py b/tests/components/generic_thermostat/test_climate.py index e0b6e5c9987..e181b14efb0 100644 --- a/tests/components/generic_thermostat/test_climate.py +++ b/tests/components/generic_thermostat/test_climate.py @@ -14,6 +14,7 @@ from homeassistant.components.climate import ( PRESET_ACTIVITY, PRESET_AWAY, PRESET_COMFORT, + PRESET_ECO, PRESET_HOME, PRESET_NONE, PRESET_SLEEP, @@ -225,6 +226,7 @@ async def setup_comp_2(hass): "sleep_temp": 17, "home_temp": 19, "comfort_temp": 20, + "eco_temp": 18, "activity_temp": 21, "initial_hvac_mode": HVACMode.HEAT, } @@ -312,6 +314,7 @@ async def test_set_target_temp(hass: HomeAssistant, setup_comp_2) -> None: (PRESET_NONE, 23), (PRESET_AWAY, 16), (PRESET_COMFORT, 20), + (PRESET_ECO, 18), (PRESET_HOME, 19), (PRESET_SLEEP, 17), (PRESET_ACTIVITY, 21), @@ -331,6 +334,7 @@ async def test_set_away_mode(hass: HomeAssistant, setup_comp_2, preset, temp) -> (PRESET_NONE, 23), (PRESET_AWAY, 16), (PRESET_COMFORT, 20), + (PRESET_ECO, 18), (PRESET_HOME, 19), (PRESET_SLEEP, 17), (PRESET_ACTIVITY, 21), @@ -358,6 +362,7 @@ async def test_set_away_mode_and_restore_prev_temp( (PRESET_NONE, 23), (PRESET_AWAY, 16), (PRESET_COMFORT, 20), + (PRESET_ECO, 18), (PRESET_HOME, 19), (PRESET_SLEEP, 17), (PRESET_ACTIVITY, 21),