Reverting thermostat setting after flow has run, advise needed

Hi all

I’m a new user & starting to get to grips with advanced flows and have a quick question that hopefully someone can quickly answer.

I want to create a flow so that if the heating comes on while a window is open, it will automatically close the thermostat in that room which is straight forward, I then want to reverse the flow so that once the window have been closed the room thermostat returns to heating mode. I currently have this set up in the Aqara app but want to move it into Homey

[Tip] Problems with Homey?

After a temporary change for Doors/Windows I revert/reset the zone’s to the schedule:

(with my Honeywell Evo Home )

thanks, will give it a go, appreciated

create a virtual button and a variable

You can trigger the button with the open window detection or replace the button by the device that detects the open window.

Oops if variable is not 0 then first set the thermostat and then set the variable

thanks will give it a try