Issue #467 - Always apply offset compensation (#567)

Co-authored-by: Jean-Marc Collin <jean-marc.collin-extern@renault.com>
This commit is contained in:
Jean-Marc Collin
2024-10-16 19:33:55 +02:00
committed by GitHub
parent 0f585be0c9
commit f6fb7487d5

View File

@@ -228,17 +228,18 @@ class ThermostatOverClimate(BaseThermostat[UnderlyingClimate]):
and self.auto_regulation_use_device_temp
# and we have access to the device temp
and (device_temp := under.underlying_current_temperature) is not None
# issue 467 - always apply offset. TODO removes this if ok
# and target is not reach (ie we need regulation)
and (
(
self.hvac_mode == HVACMode.COOL
and self.target_temperature < self.current_temperature
)
or (
self.hvac_mode == HVACMode.HEAT
and self.target_temperature > self.current_temperature
)
)
# and (
# (
# self.hvac_mode == HVACMode.COOL
# and self.target_temperature < self.current_temperature
# )
# or (
# self.hvac_mode == HVACMode.HEAT
# and self.target_temperature > self.current_temperature
# )
# )
):
offset_temp = device_temp - self.current_temperature