# H.O.O.P. (Hope) - Flow Director

**URL:** <https://community.homey.app/t/h-o-o-p-hope-flow-director/43970>\
**Category:** Apps\
**Tags:** app, tools, flow\
**Created:** [March 4, 2021, 6:20pm UTC](https://community.homey.app/t/h-o-o-p-hope-flow-director/43970 "2021-03-04T18:20:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [March 4, 2021, 6:20pm UTC](https://community.homey.app/t/h-o-o-p-hope-flow-director/43970/1 "2021-03-04T18:20:00Z")

</div>

# Flow Director

Part of: [H.O.O.P. (Hope) - Homey Object Oriented Programming](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709)

# Summary

This device offers flow cards to manage statements within condition parts of a flow.  
Inner IF statements are supported.

These flow cards only function when a flow is triggered through H.O.O.P. (doesn’t need to be a H.O.O.P. trigger, Await will also do the trick).

# Flow cards

## Conditions

- **IF (all cards until Then are) Operator = AndAlso && or And &**  
Starts an IF statement within the condition part of a flow.  
Operator for the cards between IF and Then-Cards can inversed between AndAlso and And.
- **OrElse / Or**  
Used to separate conditions groups between IF-Cards and Then-Cards
- **Then**  
If the cards between If-Card and Then-Card are equal to the value given in the If-Card (true or false), then executes the next cards until the Else-Card or End If-Card
- **Else**  
Does it need an explanation?
- **Else If**  
Opens a new IF statement (that needs a Then-Card) if the previous IF statement failed.
- **End IF**  
Closes the IF statement

# Examples

### Example:

Dim the light on to 30% of its dark, dim it to 90% when its lighter, and don’t turn it on when its fully light outside.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/5/f599783f56fd05f230708013e814fd0aa8686ddd.png)

### Example:

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/b/2be63162ce8681e54f2fe4daba4292fd5a1e405d.png)

### Example:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/3/d392c7d0a11daed1897a19ce8cad5aa5a872430a.png)  
  

### Example:

Inner IF statements

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/b/ebbd506d096968652dae34d1a78dfe00fecd676d.png)

---

<div class="post-metadata">

**Author:** ![johan\_bendz](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_bendz/32/10344_2.png) [@johan\_bendz](https://community.homey.app/u/johan_bendz)\
**Post date:** [March 3, 2021, 8:58am UTC](https://community.homey.app/t/h-o-o-p-hope-flow-director/43970/2 "2021-03-03T08:58:27Z")

</div>

Unlisted on March 3, 2021, 8:58am UTC



---

<div class="post-metadata">

**Author:** ![johan\_bendz](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_bendz/32/10344_2.png) [@johan\_bendz](https://community.homey.app/u/johan_bendz)\
**Post date:** [March 4, 2021, 6:20pm UTC](https://community.homey.app/t/h-o-o-p-hope-flow-director/43970/3 "2021-03-04T18:20:54Z")

</div>

Listed on March 4, 2021, 6:20pm UTC



---

<div class="post-metadata">

**Author:** ![David](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/david/32/16401_2.png) [@David](https://community.homey.app/u/David)\
**Post date:** [March 5, 2021, 11:16pm UTC](https://community.homey.app/t/h-o-o-p-hope-flow-director/43970/4 "2021-03-05T23:16:39Z")

</div>

Wauw! Looks nice!

I’ll give it a try. Looks like a more logical approach!

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [March 5, 2021, 11:20pm UTC](https://community.homey.app/t/h-o-o-p-hope-flow-director/43970/5 "2021-03-05T23:20:49Z")

</div>

Thanks!

And, yeah, its way easier to do a few if-then-elseif statements in one flow, then having to make a lott of flows and use delays to first start a action and 1 sec later the next.

It makes the flows function synchronised, which is many times a good thing (since you can’t give or handler promises in floweditor 🙂 )
