# Beginner: how to design a good flow | like prevent repetition when its unwanted

**URL:** <https://community.homey.app/t/beginner-how-to-design-a-good-flow-like-prevent-repetition-when-its-unwanted/30388>\
**Category:** Flows\
**Created:** [May 25, 2020, 2:05pm UTC](https://community.homey.app/t/beginner-how-to-design-a-good-flow-like-prevent-repetition-when-its-unwanted/30388 "2020-05-25T14:05:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [May 25, 2020, 6:43pm UTC](https://community.homey.app/t/beginner-how-to-design-a-good-flow-like-prevent-repetition-when-its-unwanted/30388/3 "2020-05-25T18:43:39Z")

</div>

What I would do:

> [@anon61197305](#):
>
> I want a vacuum to clean if everyone has left the house.

1.You need to set up presence detection (search the forum, many ways to do that

> [@anon61197305](#):
>
> But not always when we leave the house (that is: just once a day (first time) instead of every time we leave that day).  
> I can imagine that you set a boulean. And reset that every night?

1. Create a boolean or virtual device “cleaning is done”
2. when everybody has left the house and “cleaning is done”=Off activate the flow that starts the cleaner,
3. In that same flow set The virtual device “cleaning is done” to On  
[/quote]
4. Reset the “cleaning is done” at a specific time

Like fantross mentioned, how you build your flow is very personal.I am a huge fan of many flow with a few cards. Want to know why?nread my post _[“how to structure your flows”](https://community.homey.app/t/how-to-structure-your-flows/25109)_

---

_[View the full topic](https://community.homey.app/t/beginner-how-to-design-a-good-flow-like-prevent-repetition-when-its-unwanted/30388)._
