Avoid changing state of reduced preset in ViCare integration (#105642)
This commit is contained in:
parent
af881d7ac8
commit
6eec4998bd
1 changed files with 4 additions and 2 deletions
|
@ -313,9 +313,10 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
|
|||
_LOGGER.debug("Current preset %s", self._current_program)
|
||||
if self._current_program and self._current_program not in [
|
||||
VICARE_PROGRAM_NORMAL,
|
||||
VICARE_PROGRAM_REDUCED,
|
||||
VICARE_PROGRAM_STANDBY,
|
||||
]:
|
||||
# We can't deactivate "normal" or "standby"
|
||||
# We can't deactivate "normal", "reduced" or "standby"
|
||||
_LOGGER.debug("deactivating %s", self._current_program)
|
||||
try:
|
||||
self._circuit.deactivateProgram(self._current_program)
|
||||
|
@ -331,9 +332,10 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
|
|||
_LOGGER.debug("Setting preset to %s / %s", preset_mode, target_program)
|
||||
if target_program not in [
|
||||
VICARE_PROGRAM_NORMAL,
|
||||
VICARE_PROGRAM_REDUCED,
|
||||
VICARE_PROGRAM_STANDBY,
|
||||
]:
|
||||
# And we can't explicitly activate "normal" or "standby", either
|
||||
# And we can't explicitly activate "normal", "reduced" or "standby", either
|
||||
_LOGGER.debug("activating %s", target_program)
|
||||
try:
|
||||
self._circuit.activateProgram(target_program)
|
||||
|
|
Loading…
Add table
Reference in a new issue