From a6af2be67596ad3470e78ac2db13ce21acdc5f62 Mon Sep 17 00:00:00 2001 From: Bart Janssens Date: Thu, 28 Dec 2023 09:31:35 +0100 Subject: [PATCH] Skip activating/deactivating Vicare standby preset (#106476) --- homeassistant/components/vicare/climate.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/vicare/climate.py b/homeassistant/components/vicare/climate.py index c14f940ffe6..0b8e3cab865 100644 --- a/homeassistant/components/vicare/climate.py +++ b/homeassistant/components/vicare/climate.py @@ -311,8 +311,11 @@ class ViCareClimate(ViCareEntity, ClimateEntity): ) _LOGGER.debug("Current preset %s", self._current_program) - if self._current_program and self._current_program != VICARE_PROGRAM_NORMAL: - # We can't deactivate "normal" + if self._current_program and self._current_program not in [ + VICARE_PROGRAM_NORMAL, + VICARE_PROGRAM_STANDBY, + ]: + # We can't deactivate "normal" or "standby" _LOGGER.debug("deactivating %s", self._current_program) try: self._circuit.deactivateProgram(self._current_program) @@ -326,8 +329,11 @@ class ViCareClimate(ViCareEntity, ClimateEntity): ) from err _LOGGER.debug("Setting preset to %s / %s", preset_mode, target_program) - if target_program != VICARE_PROGRAM_NORMAL: - # And we can't explicitly activate "normal", either + if target_program not in [ + VICARE_PROGRAM_NORMAL, + VICARE_PROGRAM_STANDBY, + ]: + # And we can't explicitly activate "normal" or "standby", either _LOGGER.debug("activating %s", target_program) try: self._circuit.activateProgram(target_program)