Skip to content

Commit 7f0108b

Browse files
author
Jean-Marc Collin
committed
Revert "Add logs for Presets not available to set since 8.3.1 (#1465)"
This reverts commit b7347f2.
1 parent 1d5be07 commit 7f0108b

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

custom_components/versatile_thermostat/base_thermostat.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,6 @@ async def init_presets(self, central_config):
688688
"""Init all presets of the VTherm"""
689689
# If preset central config is used and central config is set,
690690
# take the presets from central config
691-
_LOGGER.warning("%s - #1419 - Initializing presets", self)
692691
vtherm_api: VersatileThermostatAPI = VersatileThermostatAPI.get_vtherm_api()
693692

694693
presets: dict[str, Any] = {}
@@ -698,11 +697,10 @@ def calculate_presets(items, use_central_conf_key):
698697
presets: dict[str, Any] = {}
699698
config_id = self._unique_id
700699
if central_config and self._entry_infos.get(use_central_conf_key, False) is True:
701-
_LOGGER.warning("%s - #1419 - Using central config for presets", self)
702700
config_id = central_config.entry_id
703701

704702
for key, preset_name in items:
705-
_LOGGER.warning("%s - #1419 - looking for key=%s, preset_name=%s", self, key, preset_name)
703+
_LOGGER.debug("looking for key=%s, preset_name=%s", key, preset_name)
706704
# removes preset_name frost if heat is not in hvac_modes
707705
if key == VThermPreset.FROST and VThermHvacMode_HEAT not in self.vtherm_hvac_modes:
708706
_LOGGER.debug("removing preset_name %s which reserved for HEAT devices", preset_name)
@@ -711,7 +709,7 @@ def calculate_presets(items, use_central_conf_key):
711709
if value is not None:
712710
presets[key] = value
713711
else:
714-
_LOGGER.warning("%s - #1419 - preset_name %s not found in VTherm API", self, preset_name)
712+
_LOGGER.debug("preset_name %s not found in VTherm API", preset_name)
715713
presets[key] = self._attr_max_temp if self._ac_mode else self._attr_min_temp
716714
return presets
717715

@@ -721,12 +719,13 @@ def calculate_presets(items, use_central_conf_key):
721719
CONF_USE_PRESETS_CENTRAL_CONFIG,
722720
)
723721

722+
# refacto
723+
# if self._entry_infos.get(CONF_USE_PRESENCE_FEATURE) is True:
724724
if self._presence_manager.is_configured:
725725
presets_away = calculate_presets(
726726
(CONF_PRESETS_AWAY_WITH_AC.items() if self._ac_mode else CONF_PRESETS_AWAY.items()),
727727
CONF_USE_PRESETS_CENTRAL_CONFIG,
728728
)
729-
_LOGGER.warning("%s - #1419 - presence is configured, presets_away=%s", self, presets_away)
730729

731730
# aggregate all available presets now
732731
self._presets: dict[str, Any] = presets
@@ -742,21 +741,18 @@ def calculate_presets(items, use_central_conf_key):
742741
if preset_value is not None and preset_value > 0:
743742
self._attr_preset_modes.append(key)
744743

745-
_LOGGER.warning("%s - #1419 - After adding presets, preset_modes to %s", self, self._attr_preset_modes)
744+
_LOGGER.debug("After adding presets, preset_modes to %s", self._attr_preset_modes)
746745
else:
747-
_LOGGER.warning("%s - #1419 - No preset_modes", self)
746+
_LOGGER.debug("No preset_modes")
748747

749748
if self._motion_manager.is_configured:
750-
_LOGGER.warning("%s - #1419 - Adding ACTIVITY preset mode", self)
751749
self._attr_preset_modes.append(VThermPreset.ACTIVITY)
752750

753751
# transform _attr_preset_modes into _vtherm_preset_modes
754752
self._vtherm_preset_modes = [VThermPreset(mode) for mode in self._attr_preset_modes]
755-
_LOGGER.warning("%s - #1419 - final preset modes %s", self, self._vtherm_preset_modes)
756753

757754
# Re-applicate the last preset if any to take change into account
758755
if self._state_manager.current_state.preset and self._state_manager.current_state.preset != VThermPreset.NONE:
759-
_LOGGER.warning("%s - #1419 - Reapplying current preset %s", self, self._state_manager.current_state.preset)
760756
await self.async_set_preset_mode_internal(self._state_manager.current_state.preset)
761757

762758
##

0 commit comments

Comments
 (0)