This commit is contained in:
Christopher Fenner
2024-02-16 09:13:23 +01:00
parent 861d509c7b
commit c89ca4a0cf

View File

@@ -82,12 +82,7 @@ VICARE_TO_HA_PRESET_HEATING = {
HeatingProgram.REDUCED: PRESET_SLEEP, HeatingProgram.REDUCED: PRESET_SLEEP,
} }
HA_TO_VICARE_PRESET_HEATING = { HA_TO_VICARE_PRESET_HEATING = {v: k for k, v in VICARE_TO_HA_PRESET_HEATING.items()}
PRESET_COMFORT: HeatingProgram.COMFORT,
PRESET_ECO: HeatingProgram.ECO,
PRESET_HOME: HeatingProgram.NORMAL,
PRESET_SLEEP: HeatingProgram.REDUCED,
}
def _build_entities( def _build_entities(
@@ -311,9 +306,7 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
_LOGGER.debug("Current preset %s", self._current_program) _LOGGER.debug("Current preset %s", self._current_program)
if self._current_program and self._current_program not in [ if self._current_program and self._current_program not in [
HeatingProgram.NORMAL, HeatingProgram.NORMAL,
HeatingProgram.NORMAL_HEATING,
HeatingProgram.REDUCED, HeatingProgram.REDUCED,
HeatingProgram.REDUCED_HEATING,
HeatingProgram.STANDBY, HeatingProgram.STANDBY,
]: ]:
# We can't deactivate "normal", "reduced" or "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) _LOGGER.debug("Setting preset to %s / %s", preset_mode, target_program)
if target_program not in [ if target_program not in [
HeatingProgram.NORMAL, HeatingProgram.NORMAL,
HeatingProgram.NORMAL_HEATING,
HeatingProgram.REDUCED, HeatingProgram.REDUCED,
HeatingProgram.REDUCED_HEATING,
HeatingProgram.STANDBY, HeatingProgram.STANDBY,
]: ]:
# And we can't explicitly activate "normal", "reduced" or "standby", either # And we can't explicitly activate "normal", "reduced" or "standby", either