From cc7b7f43b97bb178858f10be6d66980f8668016f Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Wed, 12 Feb 2025 14:38:50 +0000 Subject: [PATCH] Fix test and default value for minimal_deactivation_delay --- custom_components/versatile_thermostat/base_thermostat.py | 2 +- custom_components/versatile_thermostat/prop_algorithm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/versatile_thermostat/base_thermostat.py b/custom_components/versatile_thermostat/base_thermostat.py index 9f69759..87282b1 100644 --- a/custom_components/versatile_thermostat/base_thermostat.py +++ b/custom_components/versatile_thermostat/base_thermostat.py @@ -371,7 +371,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]): self._tpi_coef_ext = 0 self._minimal_activation_delay = entry_infos.get(CONF_MINIMAL_ACTIVATION_DELAY) - self._minimal_deactivation_delay = entry_infos.get(CONF_MINIMAL_DEACTIVATION_DELAY) + self._minimal_deactivation_delay = entry_infos.get(CONF_MINIMAL_DEACTIVATION_DELAY, 0) self._last_temperature_measure = self.now self._last_ext_temperature_measure = self.now diff --git a/custom_components/versatile_thermostat/prop_algorithm.py b/custom_components/versatile_thermostat/prop_algorithm.py index 027e86a..4c4679f 100644 --- a/custom_components/versatile_thermostat/prop_algorithm.py +++ b/custom_components/versatile_thermostat/prop_algorithm.py @@ -196,7 +196,7 @@ class PropAlgorithm: if self._off_time_sec < self._minimal_deactivation_delay: if self._off_time_sec > 0: _LOGGER.info( - "%s - Force 100% heating cycle since the off duration (%f) is shorter than minimal_deactivation_delay (%f)", + "%s - Force 100%% heating cycle since the off duration (%f) is shorter than minimal_deactivation_delay (%f)", self._vtherm_entity_id, self._off_time_sec, self._minimal_deactivation_delay,