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

Hi, I would like to do the following:

Step 1: When sun sets, turn on the garden lights at 10%
Step 2: Send notification that garden lights were turned on at 10%
Step 3: Set dimmer to 100% during 3600 seconds (increases brightness over one hour)
Step 4: ONLY WHEN 100% IS REACHED send notification that lights are now at 100%

So, I want my steps to be sequential. At this moment, when I run the flow all notifications are sent out at once.

How can I make the next step in a flow to start only when the previous one was (successfully) ended?

Thanks,

Dagmar

One possible option:

Flow1:
When sun sets
Then turn on the garden lights at 10%
And
With a delay of 2 s Start flow2

Flow2:
When flow was startet
And the garden lights = 10%
Then Send notification that garden lights were turned on at 10%
And Set dimmer to 100% during 3600 seconds
and Start Flow3 with a delay of 3602 s

Flow3
When Flow was startet
And dimmer = 100%
Then send notification that lights are now at 100%

Another Option

Flow1:
When sun sets
Enable Flow2
And
Then turn on the garden lights at 10% with 1s delay
And disable Flow2 with 5s delay

Flow2:
When the garden light dimm level changes
And the garden lights = 10%
Then Send notification that garden lights were turned on at 10%
And Set dimmer to 100% during 3600 seconds
and Enable Flow3

Flow3
When dimm level has changed
And dimm level = 100%
Then send notification that lights are now at 100%
And disable Flow3 with 5s delay

Hi Osorkon,

Thanks for this solution. However, it is not what I was looking for.
What I meant is if it is possible at all to create dependancies within 1 flow. Your solution (well the first one…) is something I figured out myself. But, as an old UNIX-admin, that feels like creating 10 shell-scripts calling each other while you can also program one. It’s a bit messy to me.

I guess what I want is not (yet) possible with Homey.

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 :slight_smile:)

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.