I have following case.
If temp value is lower than setpoint activate a relay.
Set min on time for the relay = 10 min (600sec).
If temp value is higher than setpoint and the 10 min are not elapsed keep relay activated
If temp value is higher than setpoint and the 10 min are elapsed : relay off
Is there a trick to make this working ?On Boiler#T Do
If [Boiler#T] < [MQTT#Set_Temp]
GPIO,26,1 // R_Boiler
TimerSet,1,600
endif
If [Boiler#T] > [MQTT#Set_Temp] And "Timer elapsed"
GPIO,26,0 // R_Compresseur
endif
Endon
As an alternative I can save the time when switching on the relay, add 10 min and check if actual time is over the 10 min but it is less elegant.
Patou