Fix thermostat ramp-off time

Fix thermostat ramp-off time (#16424)
This commit is contained in:
Theo Arends 2022-11-24 15:09:39 +01:00
parent a381da3a39
commit 430396832f

View File

@ -428,6 +428,14 @@ void ThermostatCtrState(uint8_t ctr_output)
break;
// Ramp-up controller (predictive)
case CTR_RAMP_UP:
// If ramp-up off time counter has been initialized
// AND ramp-up off time counter value reached
if ((Thermostat[ctr_output].time_ctr_checkpoint != 0) &&
(TasmotaGlobal.uptime >= Thermostat[ctr_output].time_ctr_checkpoint)) {
// Reset times
Thermostat[ctr_output].time_ctr_checkpoint = 0;
Thermostat[ctr_output].timestamp_rampup_start = TasmotaGlobal.uptime;
}
break;
#ifdef USE_PI_AUTOTUNING
// PI autotune