mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
simplify
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user