Issue 348 self regulation use internal temp (#373)

* Add config option

* With all features + testu ok

* Change algo using underlying internal temp

* Algo fixes

* Bières !

* Change reset cumulated_error formula

* FIX pi algo test with accumulated_error reset

---------

Co-authored-by: Jean-Marc Collin <jean-marc.collin-extern@renault.com>
This commit is contained in:
Jean-Marc Collin
2024-02-04 08:57:04 +01:00
committed by GitHub
parent c60f23a9ca
commit 0a50d0fd4e
16 changed files with 336 additions and 64 deletions

View File

@@ -1233,9 +1233,9 @@ class BaseThermostat(ClimateEntity, RestoreEntity):
)
# If AC is on maybe we have to change the temperature in force mode, but not in frost mode (there is no Frost protection possible in AC mode)
if self._hvac_mode == HVACMode.COOL:
if self._hvac_mode == HVACMode.COOL and self.preset_mode != PRESET_NONE:
if self.preset_mode != PRESET_FROST_PROTECTION:
await self._async_set_preset_mode_internal(self._attr_preset_mode, True)
await self._async_set_preset_mode_internal(self.preset_mode, True)
else:
await self._async_set_preset_mode_internal(PRESET_ECO, True, False)