# Flow "Then" section doesn't work as expected

**URL:** <https://community.homey.app/t/flow-then-section-doesnt-work-as-expected/24837>\
**Category:** Questions & Help\
**Created:** [January 22, 2020, 4:45pm UTC](https://community.homey.app/t/flow-then-section-doesnt-work-as-expected/24837 "2020-01-22T16:45:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ima/32/18816_2.png) [@Ima](https://community.homey.app/u/Ima)\
**Post date:** [January 22, 2020, 4:45pm UTC](https://community.homey.app/t/flow-then-section-doesnt-work-as-expected/24837/1 "2020-01-22T16:45:55Z")

</div>

Hi guys,

I created a flow that activates via a multi-switches device (a Sonoff 4CH) some water pumps, during night, every other day. I supposed that

- activating the first switch (Switch 1 On),
- turning it off after 40 minutes (Switch 1 Off),
- switching on the second switch (Switch 2 On)
- and then turning it off (Switch 2 Off) after another 40 minutes,

would have done - - - in sequence - - - these actions. But this procedure triggers the two switches at the same time…

Am I missing anything about the logic? Is there some way to instruct Homey to do an action after other, or do I have to split the “Then” events in two separate flows?  
Here is my flow:

 ![Flow](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/8/386727ecb1fa399c1bd06f2a9780b2c4b0d6bc25.png)

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [January 22, 2020, 4:59pm UTC](https://community.homey.app/t/flow-then-section-doesnt-work-as-expected/24837/2 "2020-01-22T16:59:08Z")

</div>

All actions in the Then section are started simultaneously. So to do what you want in sequence you would have to setup the delay for the switch 2 on to 40 mins and switch 2 off to 80 minutes.  
Alternatively you can create two flows and trigger the second flow when the switch 1 state changes to off.  
Also you might want to look at the countdown and timer apps to see if they help do what you want.

Edit: The advantages of the countdown and timers apps is they can be cancelled where the delays can’t.

---

<div class="post-metadata">

**Author:** ![Ima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ima/32/18816_2.png) [@Ima](https://community.homey.app/u/Ima)\
**Post date:** [January 22, 2020, 5:19pm UTC](https://community.homey.app/t/flow-then-section-doesnt-work-as-expected/24837/3 "2020-01-22T17:19:11Z")

</div>

Thank you very much, Adrian\_Rockall! Very fast!
