# Open window detection to turn off the thermostat (no window sensors)

**URL:** <https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523>\
**Category:** Flows\
**Created:** [March 9, 2022, 9:57pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523 "2022-03-09T21:57:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 9, 2022, 9:57pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/1 "2022-03-09T21:57:48Z")

</div>

hi, can someone help me to create a flow that turns off the thermostat if the temperature drops by 0.5 degrees in 5 minutes.

---

<div class="post-metadata">

**Author:** ![Undertaker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/undertaker/32/53278_2.png) [@Undertaker](https://community.homey.app/u/Undertaker)\
**Post date:** [March 10, 2022, 3:07am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/2 "2022-03-10T03:07:58Z")

</div>

Which thermostats do you use? Many have a window open detection.  
The flow you want is possible with variables, but you have to switch the thermostat on again when the window is closed.  
I think it would be easier and more reliable if you got some window sensors. There are very cheap ones from Neo Coolcam.

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 10, 2022, 7:14am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/3 "2022-03-10T07:14:36Z")

</div>

thanks for the answer, I use netatmo thermostats there are 9 thermostats one in each room I would like to avoid putting sensors because there are more than one window in the rooms but the biggest problem is the batteries to be replaced every time. with the window sensor I was able to create the flow without problems. my idea was to turn off the thermostat when the temperature drops by 0.3 degrees in 5 minutes and then turn it back on after a few hours, the problem I’m having in creating the flow is in the part ‘the temperature drops by 0.3 degrees’.

---

<div class="post-metadata">

**Author:** ![Undertaker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/undertaker/32/53278_2.png) [@Undertaker](https://community.homey.app/u/Undertaker)\
**Post date:** [March 10, 2022, 8:33am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/4 "2022-03-10T08:33:58Z")

</div>

Netatmo message from 28.1.20

The smart radiator thermostats from Netatmo now have window-open detection, which ensures that the radiators are automatically closed when the window is open. Not only new devices benefit from the function, but once again also existing customers through a software update.

The thermostats react to the drop in temperature that occurs when the window is opened. If the radiator and the thermostat are too far away from the window and the temperature does not drop sufficiently, however, it does not react accordingly. A symbol displayed on the thermostat shows the user that an open window has been detected. The heating is switched on again when the closing of the window is detected by a rise in temperature or 30 minutes have passed.

Switching off the heating when the window is open can also be deactivated by the user. Either in individual cases by explicitly selecting in the app that the heating should continue, or across the board for all thermostats.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 10, 2022, 8:53am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/5 "2022-03-10T08:53:36Z")

</div>

Although there seems to be a “window open” function (@Undertaker was faster than me 😉), I created a few flows (sorry, only in German language and not checked!):

Flow 1

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/e/1edbb4f9b1c4a0d80f1e65e2d15206c6db1d8fa2.png)

Flow 2 (corrected)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/d/ada4f0926d42cd5aef37d405a69d0924bfa4d5cf.png)

Flow 3

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/5/15d7557ac1d5af8d7fdf4860b970014f59e0b846.png)

Flow 4

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/f/4fd6d0537ae2afe0e737463d6a83040a5e58ec6d.png)

**EDIT**  
Flow 2 corrected

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 10, 2022, 9:21am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/6 "2022-03-10T09:21:00Z")

</div>

yes it’s true netatmo has this function but only with radiator valves and not on the direct thermostat I don’t know why I wrote to them directly and they confirmed it to me, the problem is that I don’t have the valves I have a floor system

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 10, 2022, 9:23am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/7 "2022-03-10T09:23:48Z")

</div>

thanks for the flows I will try to recreate them, I will update you on the functioning

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 11, 2022, 8:41am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/8 "2022-03-11T08:41:29Z")

</div>

i recreated all your flows but i’m having problems with the netatmo app on homey i think it doesn’t work, it doesn’t update the temperature and if i try to change the temperature from app homey it doesn’t take it, i also tried to uninstall it but nothing, i wouldn’t want it it’s the fault of the recent update they made of the app. first I have to be able to solve this problem in order to use the flows you created.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 11, 2022, 10:04am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/9 "2022-03-11T10:04:56Z")

</div>

I don’t use Netatmo wall thermostats myself, so I can’t say anything about possible problems.  
But you can describe the problem in this [thread](https://community.homey.app/t/app-netatmo-by-athom/360/230), maybe someone can help you.

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 11, 2022, 1:29pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/10 "2022-03-11T13:29:18Z")

</div>

i managed to fix the problem with the thermostats, although i noticed that the current temperature is only updated every 15 minutes from homey to the thermostat, so i increased the temperature timer to 15 minutes.  
I didn’t understand only in the second flow why do you multiply it by -1?

 ![Schermata 2022-03-11 alle 14.28.06](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/d/9deaec407fb067ad0b3dd6a9de71bb487abc4509.jpeg)

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 11, 2022, 2:24pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/11 "2022-03-11T14:24:10Z")

</div>

That’s a mistake, good catch.

It must be:  
_ **TV\_TemperaturResult** _ als {{_ **TV\_TemperatureOld** _ - _ **TV\_TemperatureNew** _}} berechnen nach 1 sec

The variable _ **TV\_TemperatureOld** _ should usually be larger than the variable _ **TV\_TemperatureNew** _. The result of this is a positive value.  
The positive value is needed for flow #3:  
And…  
_ **TV\_TemperaturResult** _ is \> than (+)0.3

**EDIT**  
@Leonardo_Soliera, I corrected flow no. 2 in the post above.

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 12, 2022, 4:02pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/12 "2022-03-12T16:02:43Z")

</div>

everything seems to work perfectly except for one thing, often the flow ‘1’ is not reactivated if the variable is not greater than 0.3 I cannot understand why I also put a delay of one second on the card that reactivates it in flow ‘3’

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 12, 2022, 10:27pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/13 "2022-03-12T22:27:43Z")

</div>

apparently the problem is when there are no variations between the old temperature and the new one, therefore result remains 0 and the variable does not change so the flow does not start

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 13, 2022, 11:40am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/14 "2022-03-13T11:40:59Z")

</div>

> [@Leonardo\_Soliera](#):
>
> often the flow ‘1’ is not reactivated if the variable is not greater than 0.3

For me everything works perfect. Can you please share you’re flows? I guess you missed to set the action card _ **Activate Flow 1** _ in flow '#3 in the **Or** section.

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

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 13, 2022, 1:11pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/15 "2022-03-13T13:11:01Z")

</div>

the flow is correct identical to yours, I am attaching the link here so you can check it: [Shared Flow | Homey](https://homey.app/f/MuFp3_/)  
Practically the problem is that the card that activates the flow ‘3’ says ‘if a variable changes’, but there are no temperature changes in the room the T.result always remains 0 and therefore the flow ‘3’ does not start and consequently does not reactivate the flow ‘1’. I managed to solve in this way, in flow ‘2’ I subtracted 100 and then added 100 to the T. result so that the variable always changes even if the result is 0. I attach the link of the modified flow ‘2’: [Shared Flow | Homey](https://homey.app/f/pf9p3_/)  
Doing so it would seem that everything works correctly even if there are no temperature changes in the room.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 14, 2022, 9:39am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/16 "2022-03-14T09:39:54Z")

</div>

You are right. Flow 3 wouldn’t be triggered if this scenario happens:

Initial situation: Variable _ **TV\_TemperaturResult** _ = 0

– Temperatur changes from 25.0 to 24.9 °C → Variable _ **TV\_TemperaturOld** _ will be set to 24.9 °C and flow 1 will be deactivated and the timer will be started  
– Timer has finished and the temperature hasn’t changed in the meantime → Variable _ **TV\_TemperaturNew** _ will be set to 24.9 °C and the result of the calculation is 0  
– Because the variable _ **TV\_TemperaturResult** _ hasn’t changed, flow 3 will not be started = flow 1 will be not activated anymore

So this should be the solution (Flow 2):

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/5/d55604367b5f8b58b2c613fe2152e16f05efb1f7.png)

Translation _ **And…** _ section:  
_ **Variable TV\_TemperaturOld** _ is not equal with (actually) _ **Temperature** _ (Netatmo Wall Thermostat)

I guess this will work now.

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 21, 2022, 9:06pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/17 "2022-03-21T21:06:16Z")

</div>

I tested the flow but the problem was only partially solved with this flow, now in case of equal temperatures the flow ‘1’ is reactivated but the flow ‘3’ does not start yet as the variable ‘result’ does not change

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 22, 2022, 11:43am UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/18 "2022-03-22T11:43:03Z")

</div>

Can you please show an example, with values?

**Edit**

> [@Leonardo\_Soliera](#):
>
> in case of equal temperatures the flow ‘1’ is reactivated but the flow ‘3’ does not start yet as the variable ‘result’ does not change

@Leonardo_Soliera, that’s how it’s supposed to work.  
No change in temperature, or if the temperature change is \<= 0.3 °C, then Flow 1 will be activated again and nothing else will happen.  
This is how a “Window Open Function” works based on the temperature measurement.  
No change in temperature = no open window = no need to turn off the thermostat… 🤷🏼‍♂️

I also don’t see any way to include the outside temperature, for example. So I think the only way is to install a window sensor. If you don’t want to do it for optical reasons, then I recommend a [Sensative Strips Guard 700](https://sensative.com/sensors/strips-zwave/strips-guard-700/), which is mounted in the window frame so that it’s not visible when the window is closed. The battery lifetime is up to 10 years acc. info of the manufacturer. The radio protocol is Z-Wave, so therefore it must be ensured that there is a well-functioning Z-Wave Mesh. Btw., I have 16 of them in use (500 and 700).

---

<div class="post-metadata">

**Author:** ![Leonardo\_Soliera](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/leonardo_soliera/32/49003_2.png) [@Leonardo\_Soliera](https://community.homey.app/u/Leonardo_Soliera)\
**Post date:** [March 26, 2022, 5:14pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/19 "2022-03-26T17:14:54Z")

</div>

Hello look the problem lies in the fact that the variable ‘result’ gets high Example if I try the flow ‘1’ with a temperature of 21.6 degrees it goes to set ‘t.old’ to 21.6 … then at the end of the timer it sets 't. New at 21.4 '(for example)  
does the count ‘t.old-t.new’ = 0.2 and up to here everything is ok, now the temperature ‘t.old’ reaches 21.4 which is equal to ‘t.new’ and in theory the ’ t. Result ‘must come 0 but with the new card you put’ e ‘(t.old is not equal to the real temperature of the physical thermostat) it does not do the calculation so’ t. Result ‘always remains 0.2 and therefore is busted by 0.2 degrees when in theory it should be 0. Honestly I don’t know if it really depends on this new card but I end up with the variable’ result 'busted if I take this card out of the flow the variable is correct. I’m not sure what it depends on.  
I do not know if I have explained myself well, if there is something you do not understand please ask, I know the sensatives I have 4 and in fact I use them on those windows but I have not bought others because after just 2 years they died amazon replaced them for me. luck but the battery life does not convince me given the price.  
flow 1: [Flow condiviso | Homey](https://homey.app/it-it/flow/JRPd7-/)  
flow 2: [Flow condiviso | Homey](https://homey.app/it-it/flow/8ZKd7-/)  
flow 3: [Flow condiviso | Homey](https://homey.app/it-it/flow/qhnd7-/)  
flow 4 [Flow condiviso | Homey](https://homey.app/it-it/flow/-qqd7-/)

here you find the variables as described:

 ![Schermata 2022-03-26 alle 18.13.39](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/c/2ccd20239ae754ddab6e13b59523d85df4feed3f.png)

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 28, 2022, 12:48pm UTC](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523/20 "2022-03-28T12:48:15Z")

</div>

I guess I know what you mean what the problem is. There might be no change of the value of the variable _ **TV\_TemperaturResult** _. As result of this, flow 3 isn’t started, right?

What comes into my mind: The variable _ **TV\_TemperaturResult** _ must be “reset” after the calculation.  
Could you add this flow and check if it works?

**When…**  
– Timer _ **Temperatura mansarda** _ is started  
**Then…**  
– Deactivate flow 3  
– Set variable _ **T. Result Mansarda** _ to 10 after 1 sec delay  
– Activate flow 3 after 2 sec delay

What do you think?

Regarding the Sensitive Strips. I also had 2 Guard Strips that showed only 25% battery capacity after a relatively short time (\<= 2 years). For both Strips I have received a replacement without having to return the old Strips. Now after about 2 more years the both Strips work still without any problems.  
The other strips still show a battery capacity of 75 - 100% after 3-4 years. So I have no reason to complain.

[Next page](https://community.homey.app/t/open-window-detection-to-turn-off-the-thermostat-no-window-sensors/61523.md?page=2)
