Skip activating/deactivating Vicare standby preset (#106476)
This commit is contained in:
parent
8e4fade725
commit
924e47c2a8
1 changed files with 10 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue