# Flow with multiple steps and wait for sensors

**URL:** <https://community.homey.app/t/flow-with-multiple-steps-and-wait-for-sensors/25762>\
**Category:** Flows\
**Created:** [February 11, 2020, 9:04am UTC](https://community.homey.app/t/flow-with-multiple-steps-and-wait-for-sensors/25762 "2020-02-11T09:04:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_Kock](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rick_kock/32/16515_2.png) [@Rick\_Kock](https://community.homey.app/u/Rick_Kock)\
**Post date:** [February 11, 2020, 9:04am UTC](https://community.homey.app/t/flow-with-multiple-steps-and-wait-for-sensors/25762/1 "2020-02-11T09:04:32Z")

</div>

I’m interesting in buying an Homey for my home automation. What I can’t figure out is if there is an way to create an flow with multiple steps. Like this:

Trigger to start flow:

- Disable alarm and turn on lights
- Wait for the front door to open
- Then wait for the front door te close again
- Then turn on the alarm an turn off the lights

Is this possible?

---

<div class="post-metadata">

**Author:** ![Joost\_Else](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/joost_else/32/17360_2.png) [@Joost\_Else](https://community.homey.app/u/Joost_Else)\
**Post date:** [February 11, 2020, 9:17am UTC](https://community.homey.app/t/flow-with-multiple-steps-and-wait-for-sensors/25762/2 "2020-02-11T09:17:10Z")

</div>

Not directly. But you can make a statemachine based on a variable and multiple flows. For example, you could:

flow #1: if (alarm disabled) then turn on lights, set state = 1  
flow #2: if (front door opens) and (state = 1) then state = 2  
flow #3: if (font door closes) and (state = 2) then turn alarm on, switch off lights, state = 0
