# How to structure your flows

**URL:** <https://community.homey.app/t/how-to-structure-your-flows/25109>\
**Category:** Flows\
**Created:** [January 27, 2020, 10:31pm UTC](https://community.homey.app/t/how-to-structure-your-flows/25109 "2020-01-27T22:31:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [January 27, 2020, 10:31pm UTC](https://community.homey.app/t/how-to-structure-your-flows/25109/4 "2020-01-27T22:31:31Z")

</div>

**How to structure your flows: using virtual devices**

I use virtual devices (button not switch!) to start my action (tag: \>) and scene (tag: #) flows. I prefer it over using “when this flow is started”

1. Virtual devices show in which flow they are used. It makes it easier to track in which flow actions and scenes are used

2. Using virtual devices makes it easier to create new flows triggered by events.

Examples

Trigger flow that starts my day, but not every day start at the same time…

It triggers a virtual device (button not a switch!). This device is used to trigger the action flows. Remember, I keep my time trigger flows together in one folder “settings”

This is the virtual button showing the flows its triggering:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/e/2e7416eb0407053a163cc6cc1eb2fe8fba547c16.jpeg)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/2/125fa373a18b808236d38aedbb0d31fda826b37f.jpeg)

I trigger the same button at different times

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/4/8468ee395dea771ab54c0bb800c8fef9c96e09bb.png)  
Sleeping in on sundays…  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/b/dbc4480d6e12aaefb7b8ec4988c1ed2eb6d5d50b.png)

**how to structure your flows: grouping of sensors**  
In some cases you will have multiple sensors that should control the same action (scene).  
Homey only allows one card in the IF sextion. That would mean you need to create the same flow for every sensor.

Another advantage of grouping is: if you ever need to exchange a sensor you do not need to update your flows! Just make sure at least one sensor stays in the group. Add the new sensor and then remove the old one. And you are done

But there is a nice solution for it: grouping of sensors.

_Motion sensors_: this is supported by athom via the “zone activity”. In the IF section select zone & devices, select the zone that your motion sensors are in  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/d/cd0482c5698e9250e0fea44c80f224c6b264d462.png)

Select the desired action

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

_Other sensors (temperature, lux etc):_  
Install the [group app](https://homey.app/nl-nl/app/com.swttt.devicegroups/%3C-group-%3E/). This app allows you to group sensors and provides card to put in the flows  
IF cards:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/2/a2544bb786ab127f6fef4a8adf1354967ac4997d.png)  
Action for the IF cards

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/b/2bb92ae9c9b67759084ed9acc869a0d40353a795.png)

---

_[View the full topic](https://community.homey.app/t/how-to-structure-your-flows/25109)._
