Change the auto-regulation last calculation

Change auto-window detection to 30 sec of delay
This commit is contained in:
Jean-Marc Collin
2023-11-12 17:44:02 +00:00
parent a3f7043f45
commit 96076bf7c2
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ from datetime import datetime
_LOGGER = logging.getLogger(__name__)
# To filter bad values
MIN_DELTA_T_SEC = 10 # two temp mesure should be > 10 sec
MIN_DELTA_T_SEC = 30 # two temp mesure should be > 10 sec
MAX_SLOPE_VALUE = 2 # slope cannot be > 2 or < -2 -> else this is an aberrant point

View File

@@ -130,6 +130,7 @@ class ThermostatOverClimate(BaseThermostat):
self._regulated_target_temp = self.target_temperature
_LOGGER.info("%s - regulation calculation will be done", self)
self._last_regulation_change = now
new_regulated_temp = round_to_nearest(
self._regulation_algo.calculate_regulated_temperature(
@@ -154,7 +155,6 @@ class ThermostatOverClimate(BaseThermostat):
self,
new_regulated_temp,
)
self._last_regulation_change = now
for under in self._underlyings:
await under.set_temperature(