Help with my rules

It all depends on when you want it to fire. In a if else end you want it to fire for two state changes. In this you want to do the same but a temperature has multiple states and that means it will fire on each change, this can cause issues if your rule can't handle this (what you had before). But once you have a run once on up and once on down your be good. So that's what the private boolean is doing here.