# Reverting thermostat setting after flow has run, advise needed

**URL:** <https://community.homey.app/t/reverting-thermostat-setting-after-flow-has-run-advise-needed/114100>\
**Category:** Questions & Help\
**Tags:** homey-pro, advancedflow\
**Created:** [August 8, 2024, 5:07pm UTC](https://community.homey.app/t/reverting-thermostat-setting-after-flow-has-run-advise-needed/114100 "2024-08-08T17:07:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pietro\_Licata](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pietro_licata/32/79677_2.png) [@Pietro\_Licata](https://community.homey.app/u/Pietro_Licata)\
**Post date:** [August 8, 2024, 5:07pm UTC](https://community.homey.app/t/reverting-thermostat-setting-after-flow-has-run-advise-needed/114100/1 "2024-08-08T17:07:29Z")

</div>

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

 ![flow](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/0/10b9ad0a224dd65f0558e367aaad16be43a193e9.png)

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [August 8, 2024, 5:20pm UTC](https://community.homey.app/t/reverting-thermostat-setting-after-flow-has-run-advise-needed/114100/2 "2024-08-08T17:20:12Z")

</div>

[[Tip] Problems with Homey?](https://community.homey.app/t/tip-problems-with-homey/35744)

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

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/7/c75c23b72cb3c7d3985a0669942a54676a16b5aa.png)

(with my [Honeywell Evo Home](https://homey.app/a/com.honeywell/) )

---

<div class="post-metadata">

**Author:** ![Pietro\_Licata](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pietro_licata/32/79677_2.png) [@Pietro\_Licata](https://community.homey.app/u/Pietro_Licata)\
**Post date:** [August 9, 2024, 4:04pm UTC](https://community.homey.app/t/reverting-thermostat-setting-after-flow-has-run-advise-needed/114100/3 "2024-08-09T16:04:25Z")

</div>

thanks, will give it a go, appreciated

---

<div class="post-metadata">

**Author:** ![rvn](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvn/32/8621_2.png) [@rvn](https://community.homey.app/u/rvn)\
**Post date:** [August 9, 2024, 8:53pm UTC](https://community.homey.app/t/reverting-thermostat-setting-after-flow-has-run-advise-needed/114100/4 "2024-08-09T20:53:59Z")

</div>

create a virtual button and a variable

 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/9/1979ed2e3ab140d0b95b6772433b768bb1164821.png)

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

---

<div class="post-metadata">

**Author:** ![Pietro\_Licata](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pietro_licata/32/79677_2.png) [@Pietro\_Licata](https://community.homey.app/u/Pietro_Licata)\
**Post date:** [August 10, 2024, 3:58pm UTC](https://community.homey.app/t/reverting-thermostat-setting-after-flow-has-run-advise-needed/114100/5 "2024-08-10T15:58:19Z")

</div>

thanks will give it a try
