From a3b6f66f1b468b142155ae6e0da939773298d8a1 Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Sat, 25 Jan 2025 11:09:34 +0100 Subject: [PATCH] Issue #846 - swicth Eco preset after Window close event (#868) Co-authored-by: Jean-Marc Collin --- custom_components/versatile_thermostat/base_thermostat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/versatile_thermostat/base_thermostat.py b/custom_components/versatile_thermostat/base_thermostat.py index 6e48783..13cb16a 100644 --- a/custom_components/versatile_thermostat/base_thermostat.py +++ b/custom_components/versatile_thermostat/base_thermostat.py @@ -1050,7 +1050,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]): self._hvac_mode in [HVACMode.COOL, HVACMode.HEAT, HVACMode.HEAT_COOL] and self.preset_mode != PRESET_NONE ): - if self.preset_mode != PRESET_FROST_PROTECTION: + if self.preset_mode != PRESET_FROST_PROTECTION or self._hvac_mode in [HVACMode.HEAT, HVACMode.HEAT_COOL]: await self.async_set_preset_mode_internal(self.preset_mode, True) else: await self.async_set_preset_mode_internal(PRESET_ECO, True, False)