# Start next step in flow only after previous one has ended successfully

**URL:** <https://community.homey.app/t/start-next-step-in-flow-only-after-previous-one-has-ended-successfully/17604>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [September 1, 2019, 9:45pm UTC](https://community.homey.app/t/start-next-step-in-flow-only-after-previous-one-has-ended-successfully/17604 "2019-09-01T21:45:50Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![anon8748058](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@anon8748058](https://community.homey.app/u/anon8748058)\
**Post date:** [September 2, 2019, 11:41am UTC](https://community.homey.app/t/start-next-step-in-flow-only-after-previous-one-has-ended-successfully/17604/5 "2019-09-02T11:41:21Z")

</div>

Hi,

I took an entirely different approach to get the end result. I asked on this forum if someone had an idea to simplify it (no-one responded, so it’s perfect probably 🙂)

> [@Suggestions to simplify flows for 'slowly' changing light colour and brightness](https://community.homey.app/t/suggestions-to-simplify-flows-for-slowly-changing-light-colour-and-brightness/17279):
>
> (( apologies for the formatting of the post. I’ll try to fix it if it is too messy at first )) Hi, I was wondering if people here have an idea to simplify a number of flows I currently have. End-goal: My end-goal is the following: I want my Philips Hue white ambiance (For those who are not familiar with it: They are white bulbs, varying light from very cold (blueish) to very warm (amberish) and everything in between) to slowly go ‘warmer’ based on the position of the sun. So, Suppose the l…

In your case it would boil down to this:  
First flow: (don’t turn on light here)  
Set variable to 0.1 (10%)  
Send event  
Start next flow

2nd flow: If variable is smaller than 1.0 Increase variable to +0.01  
Then restart this flow after 5 seconds (or something)  
Else send push message “light is 100%”

3rd flow:  
If variable is changed  
Set bulb to variable value

So:  
The first flow starts everything and sends you a message  
The second flow loops and changes a variable by a small value every so many seconds  
This way the 3rd flow manages the bulb brightness directly when the variable changes

In my example the bulb would raise from 10% to 100% (900 steps \* 5 seconds = 4500 seconds / 75 minutes)  
You may need to tweak it a little here and there, but the base idea works for me.

---

_[View the full topic](https://community.homey.app/t/start-next-step-in-flow-only-after-previous-one-has-ended-successfully/17604)._
