# How to do a flow with "when one of the devices is on" condition

**URL:** <https://community.homey.app/t/how-to-do-a-flow-with-when-one-of-the-devices-is-on-condition/57165>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [December 24, 2021, 7:20pm UTC](https://community.homey.app/t/how-to-do-a-flow-with-when-one-of-the-devices-is-on-condition/57165 "2021-12-24T19:20:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mimomaj](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mimomaj/32/17200_2.png) [@Mimomaj](https://community.homey.app/u/Mimomaj)\
**Post date:** [December 24, 2021, 7:20pm UTC](https://community.homey.app/t/how-to-do-a-flow-with-when-one-of-the-devices-is-on-condition/57165/1 "2021-12-24T19:20:27Z")

</div>

Hello and merry Christmas!

I am trying to hook up my heating system and have almost everything set up: vthermo thermostats, Heatit Z-water controlling underfloor heating valves, qubino flush relay controlling boiler.  
Now to my question, I would like to turn on my boiler when at least one of my thermostats require heating, and turn off the boiler only when all of the thermostats are off.  
Would some of you guys be so kind and help me out?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [December 24, 2021, 7:55pm UTC](https://community.homey.app/t/how-to-do-a-flow-with-when-one-of-the-devices-is-on-condition/57165/2 "2021-12-24T19:55:57Z")

</div>

This is a way to accomplish it  
If…  
“time and date” every x minute(s)  
And…  
Vthermo A is off / thermostat is inactive  
And…  
Vthermo B is off / thermostat is inactive  
And…  
Vthermo C is off / thermostat is inactive  
And…  
Vthermo D is off / thermostat is inactive  
And…  
Vthermo E is off / thermostat is inactive  
Then…  
Turn boiler off  
Else then…  
Turn boiler on

---

<div class="post-metadata">

**Author:** ![Mimomaj](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mimomaj/32/17200_2.png) [@Mimomaj](https://community.homey.app/u/Mimomaj)\
**Post date:** [December 24, 2021, 8:19pm UTC](https://community.homey.app/t/how-to-do-a-flow-with-when-one-of-the-devices-is-on-condition/57165/3 "2021-12-24T20:19:23Z")

</div>

@Peter_Kawa thank you for your response, I appreciate it.  
Meanwhile I have taught of another way to accomplish this (not tested it yet though).  
I have already flows in place for each of the thermostats turning off. So what if I put the: thermostats xyz is off in the ‘and’ section. That way the flow doesn’t need to run periodically. At least in theory, I need to test this 😀

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [December 24, 2021, 8:34pm UTC](https://community.homey.app/t/how-to-do-a-flow-with-when-one-of-the-devices-is-on-condition/57165/4 "2021-12-24T20:34:18Z")

</div>

YW, Michal.

If you already have flows for every “vthermo X is turned off”,  
then it works for the “turn boiler off” part,  
if you indeed add AND “vthermo ABCDE is off”

For the “turn boiler on” part you could consider a flow for each  
If…  
“vthermo X is turned on”  
And…  
boiler is off  
Then  
turn boiler on

Note about my initial flow idea: triggering a flow every minute is not a problem. Triggering every second is risky though.

---

<div class="post-metadata">

**Author:** ![Mimomaj](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mimomaj/32/17200_2.png) [@Mimomaj](https://community.homey.app/u/Mimomaj)\
**Post date:** [December 25, 2021, 6:02am UTC](https://community.homey.app/t/how-to-do-a-flow-with-when-one-of-the-devices-is-on-condition/57165/5 "2021-12-25T06:02:30Z")

</div>

Yeah it worked!  
For the boiler on part I left it without additional conditions, as I can “turn on the boiler” even if it is already on, it makes no difference here.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [December 25, 2021, 11:01pm UTC](https://community.homey.app/t/how-to-do-a-flow-with-when-one-of-the-devices-is-on-condition/57165/6 "2021-12-25T23:01:34Z")

</div>

Great to hear.

> [@Mimomaj](#):
>
> even if it is already on, it makes no difference here.

Yeah it’s personal. It can’t do no harm without the “is off” condition, but it is ‘cleaner’ so to speak, it then sends no unnecessary actions.

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [December 26, 2021, 9:48am UTC](https://community.homey.app/t/how-to-do-a-flow-with-when-one-of-the-devices-is-on-condition/57165/7 "2021-12-26T09:48:30Z")

</div>

Take a look at the [group app.](https://homey.app/nl-nl/app/com.swttt.devicegroups/%3C-group-%3E/)  
With this app you can group devices and use the response based on the group values (max, min, agv etc).  
It also has heater and thermostat type.

I only used the temp sensor so did not test if if works the way you ask.  
But it looks promising
