From c89ca4a0cff30e0f9ce1658e83dae0280fe52f01 Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Fri, 16 Feb 2024 09:13:23 +0100 Subject: [PATCH] simplify --- homeassistant/components/vicare/climate.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/homeassistant/components/vicare/climate.py b/homeassistant/components/vicare/climate.py index b202518d0fe..31aa4363466 100644 --- a/homeassistant/components/vicare/climate.py +++ b/homeassistant/components/vicare/climate.py @@ -82,12 +82,7 @@ VICARE_TO_HA_PRESET_HEATING = { HeatingProgram.REDUCED: PRESET_SLEEP, } -HA_TO_VICARE_PRESET_HEATING = { - PRESET_COMFORT: HeatingProgram.COMFORT, - PRESET_ECO: HeatingProgram.ECO, - PRESET_HOME: HeatingProgram.NORMAL, - PRESET_SLEEP: HeatingProgram.REDUCED, -} +HA_TO_VICARE_PRESET_HEATING = {v: k for k, v in VICARE_TO_HA_PRESET_HEATING.items()} def _build_entities( @@ -311,9 +306,7 @@ class ViCareClimate(ViCareEntity, ClimateEntity): _LOGGER.debug("Current preset %s", self._current_program) if self._current_program and self._current_program not in [ HeatingProgram.NORMAL, - HeatingProgram.NORMAL_HEATING, HeatingProgram.REDUCED, - HeatingProgram.REDUCED_HEATING, HeatingProgram.STANDBY, ]: # We can't deactivate "normal", "reduced" or "standby" @@ -332,9 +325,7 @@ class ViCareClimate(ViCareEntity, ClimateEntity): _LOGGER.debug("Setting preset to %s / %s", preset_mode, target_program) if target_program not in [ HeatingProgram.NORMAL, - HeatingProgram.NORMAL_HEATING, HeatingProgram.REDUCED, - HeatingProgram.REDUCED_HEATING, HeatingProgram.STANDBY, ]: # And we can't explicitly activate "normal", "reduced" or "standby", either