I am a huge fan of precise triggers over conditions for things like this.
IF humidity raises above 80% <-- Only triggers once when it crosses the threshold
Then set heating point to 25 degrees
End IF
IF humidity drops below 75% <-- Same goes for this line
Then set heating point to 17 degrees
End IF
(I intentionally left a small gap between the two numbers so it won’t go on/off quickly when it is on the fence)
I would re-think the logic in lines 12-21.
Either
(A) it stays at 25 degrees until the humidity drops (as shown above), or
(B) it stays at 25 degrees until 30 minutes have passed.
(but not both, or it may cycle temps way too often)
It is also important to consider conflicting statements causing havoc. For example, what if the humidity is high (thermostat to 25 degrees) and the garage temp is less than 5 degrees (thermostat to 23 degrees) There is going to be some serious competition going on, and the results will not be good.