Sensibo active temperature control

I'm trying to set up an active climate control rule (similar but better than the one built into the Sensibo app). This will check the temperature in the room, and if too low, adjust the AC automatically up to a higher setting. I want to use this in rental properties to avoid guests keep setting the ACs to 18 degs and it costing me a fortune to refrigerate rooms. The problem with the routine built into the Sensibo app is that if the temperature in the room drops too low with the AC off (eg. due to cold weather), the routine will prompt the AC to a higher temperature which is fine but it switches the device on when it was actually off. If the AC is off then of course it shouldn't do anything, but this is not possible in the app.

So here is my simple rule which I thought would work, where I check to see if the AC is actually on before adjusting it's temperature when the room gets too cold...

However, what happens is the AC keeps getting reset to 27 degs every minute. I can hear the beep over and over.

I think what's happening is the AC gets polled every minute for its status, and this retriggers the rule (which surprised me because it says "becomes" but it seems it just evaluates if the temperature is less than 25 at each polling) . So I added the private boolean to try to prevent it from retriggering the AC adjustment. But the private boolean never seems to get set to true, even after I hear the AC beep as it is commanded to adjust back up to 27 degs again.

Any ideas how I could achieve the desired result?

This rule is going to trigger every time the temp is read as <25.0. You need to change your else to an else-if of the temp being >=25.0. Then it won't turn the rule back on until the temp drops below 25 the next time.