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.
I mean, should a rule really be this difficult to achieve (above). I literally just want to be notified every 5mins if the mrs work fridge goes above a safe level. I wish it was more simple like.
Device: Fridge Temp Condition: >= 6 degrees Rule: repeat X every 5 mins on X devices else if < 6 degrees stop repeat.
Could i be super painful and ask about the below as well. After this whole rule I am not sure about a bunch of other ones and I ended up clicking and changing a bunch at the same time last night as I thought they were wrong like this fridge one.
I'll have to look tomorrow need to be up in 6 hours. But quick glance yes you need to apply same logic if you have repeats. The others I need to look at and check.
The trigger events determine when the Actions will be evaluated.
So in your case when the Cupboard becomes > 35 or = 35 the "Select Actions to Run" will be evaluated and if all the action conditions meet the criteria the actions will be executed.
In your case there is no trigger for the temperature falling below 35
As @JohnRob said your need the trigger to be changed but your also need the private boolean to stop it from constantly sending a ON or a OFF.
I still need to see if there is a better way to do this though. The private boolean does work and stops it fully running the rule or the actions unless it needs to. But the rule still is waking up and evaluating on each temperature change. Ideally I don't want it to do that but I don't think it possible and it's a tiny rule so shouldn't be a issue. As long as you don't have lots of different rules all for the same temperature sensor, if that's the case they would be best in the same rule.
IF (temp is more than X AND private boolean is true)
ON plug.
Set private boolean to FALSE
ELSE-IF (temp is less than X AND private boolean is false)
OFF plug
Set private boolean to TRUE
END IF