mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Skip activating/deactivating Vicare standby preset (#106476)
This commit is contained in:
parent
fb893a5315
commit
a6af2be675
@ -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…
x
Reference in New Issue
Block a user