# \[REQUEST\] Additional options for Flow logic

**URL:** <https://community.homey.app/t/request-additional-options-for-flow-logic/41601>\
**Category:** Ideas & Suggestions\
**Tags:** flow\
**Created:** [January 22, 2021, 1:05pm UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601 "2021-01-22T13:05:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeeHaa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeehaa/32/29849_2.png) [@JeeHaa](https://community.homey.app/u/JeeHaa)\
**Post date:** [January 22, 2021, 1:05pm UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/1 "2021-01-22T13:05:20Z")

</div>

I’m sure this is not a new request, but it would be great if we could use a bit more logic in flows.

- Also allow OR in WHEN Statement: e.g. WHEN time is 08:00 OR MyButtonPressed OR MotionDetected THEN TurnOnLight
- Prevent Concurrent Flows: prevent new flows from starting when another instance of it is still running
- Allow setting delay per 0.1s instead of 1s. In some cases 1s is just too much and 0.1s may be enough.
- Synchronous Execution: start cards one after the other as defined in the flow (in order to make flows more predictable)
- Allow one additional nested THEN level: … THEN (IF Time \>20:00 THEN DimLevel=20 ELSE DimLevel=80)

Especially 1. would be extremely useful and should not be too complicated to implement (I guess effectively the same as multiple identical flows triggering on a different WHEN event).

BTW: The concept of cards and “AND” not being shown as part of the “WHEN” condition is something you need to get used at (to me “AND” belongs to the “WHEN” statement).

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [January 22, 2021, 2:03pm UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/2 "2021-01-22T14:03:25Z")

</div>

Agree, +5 😉

---

<div class="post-metadata">

**Author:** ![Andres\_Moerland](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andres_moerland/32/33756_2.png) [@Andres\_Moerland](https://community.homey.app/u/Andres_Moerland)\
**Post date:** [January 22, 2021, 3:03pm UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/3 "2021-01-22T15:03:17Z")

</div>

+1 if you ask me!

---

<div class="post-metadata">

**Author:** ![Shakesbeard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/shakesbeard/32/15112_2.png) [@Shakesbeard](https://community.homey.app/u/Shakesbeard)\
**Post date:** [January 22, 2021, 4:17pm UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/4 "2021-01-22T16:17:39Z")

</div>

Mostly point 1) would be very very useful. Nested thens, well nice to have I guess but no difference to just launching the next flow. I would most likely go with just another flow being triggered to keep things organized. But that’s just me 😃 +10

---

<div class="post-metadata">

**Author:** ![JeeHaa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeehaa/32/29849_2.png) [@JeeHaa](https://community.homey.app/u/JeeHaa)\
**Post date:** [January 24, 2021, 5:48pm UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/5 "2021-01-24T17:48:31Z")

</div>

Added a few useful options to the list in OP…

---

<div class="post-metadata">

**Author:** ![Kevjan](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevjan/32/34880_2.png) [@Kevjan](https://community.homey.app/u/Kevjan)\
**Post date:** [January 24, 2021, 6:47pm UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/6 "2021-01-24T18:47:37Z")

</div>

Agree on your first point!  
I have to many flows starting the same actions, this could be easier.

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [July 30, 2021, 4:10pm UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/7 "2021-07-30T16:10:19Z")

</div>

1 is low hanging fruit, but also consecutive execution is an implicit expectation of most users.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [July 30, 2021, 9:38pm UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/8 "2021-07-30T21:38:51Z")

</div>

> [@JeeHaa](#):
>
> Also allow OR in WHEN Statement: e.g. WHEN time is 08:00 OR MyButtonPressed OR MotionDetected THEN TurnOnLight

Guess you can give your hope up on this,  
has been a request from the first releases but as different flow triggers can have different tokens (Temperature changed has [Temperature], Someone came home has [name]) …  
many combinations have no options to combine multiple triggers in a flow. That is against their design philosophy.  
just create multiple flows triggering a executing flow.  
Same for your last request.

others +1

---

<div class="post-metadata">

**Author:** ![tb1962](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tb1962/32/7888_2.png) [@tb1962](https://community.homey.app/u/tb1962)\
**Post date:** [July 31, 2021, 6:11am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/9 "2021-07-31T06:11:46Z")

</div>

@Dijker, Hmmmm, i doubt it is that difficult.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 31, 2021, 6:46am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/10 "2021-07-31T06:46:42Z")

</div>

> [@JeeHaa](#):
>
> Synchronous Execution: start cards one after the other as defined in the flow (in order to make flows more predictable)

That’s sort-of how firmware v1 and earlier worked (but see below for a caveat on why this isn’t as easy as it sounds). Starting with firmware v2, flow actions are started concurrently (at the same time).

The reason why synchronous execution sounds easier than it is, is because a lot of flow actions are asynchronous by nature, especially those that send commands to devices (over WiFi/Z-Wave/Zigbee). “Real” synchronous execution (at least how most users would expect it to work) would mean that a flow action card would send a command and wait for some sort of acknowledgement from the device before continuing to the next flow action card.

Since acknowledgements aren’t mandatory (or even available) in a lot of protocols, all Homey can do is send the command and hope it gets received.

Long story short: synchronous execution would only work for cards that are synchronous by nature. But I do agree that synchronous execution would make flows more predictable: it doesn’t really make sense to have, for instance, a card that calculates the value of a variable and a following card that uses that new value to be started concurrently, as they do now. But apparently, Athom thought that the _perceived_ speed increase of starting cards concurrently would be better than starting them consecutively.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [July 31, 2021, 7:02am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/11 "2021-07-31T07:02:59Z")

</div>

> [@tb1962](#):
>
> i doubt it is that difficult.

I didn’t say it is difficult.

---

<div class="post-metadata">

**Author:** ![Undertaker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/undertaker/32/53278_2.png) [@Undertaker](https://community.homey.app/u/Undertaker)\
**Post date:** [July 31, 2021, 7:21am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/12 "2021-07-31T07:21:27Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [July 31, 2021, 7:50am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/13 "2021-07-31T07:50:41Z")

</div>

> [@JeeHaa](#):
>
> Especially 1. would be extremely useful and should not be too complicated to implement (I guess effectively the same as multiple identical flows triggering on a different WHEN event).

Its a personal thing… I prefer creating multiple flows.

An advantage of creating multiple identical flows is:  
It makes your flows much easier to understand and prevent entanglements.  
Troubleshooting is easier.

(On the other hand, making it available does not mean you have to use it 😉)

---

<div class="post-metadata">

**Author:** ![tb1962](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tb1962/32/7888_2.png) [@tb1962](https://community.homey.app/u/tb1962)\
**Post date:** [July 31, 2021, 7:57am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/14 "2021-07-31T07:57:25Z")

</div>

@Dijker, the comment of @robertklep makes sense to me. The reason i think that point 1 of @JeeHaa is not that difficult is because the when part of a flow is mostly event driven. Homey doesn’t need to ask for a value. When a state-change happend on a device, the new state will be send to Homey and based on that new value a flow will be triggered. That’s why i think adding multiple triggers for flows should’t be that difficult.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 31, 2021, 8:39am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/15 "2021-07-31T08:39:13Z")

</div>

It’s not really that simple if you think about it: condition cards can depend on tags provided by trigger cards.

Consider the situation where you have two completely different trigger cards, with different tags: there’s (currently) no way for condition cards to handle such a situation. You’d need something like _“if trigger was card “ **A user came home** ”, then if the user tag contains A, then continue; otherwise, if trigger was card “ **Temperature changed** ”, then if temperature tag was lower than B, then continue”_.

The way flows work now is pretty much tied to having just a single trigger card.

---

<div class="post-metadata">

**Author:** ![tb1962](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tb1962/32/7888_2.png) [@tb1962](https://community.homey.app/u/tb1962)\
**Post date:** [July 31, 2021, 9:00am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/16 "2021-07-31T09:00:59Z")

</div>

@robertklep, I agree that would be difficult to implement, but thats not how i think multiple triggers should work. @JeeHaa has a good and simple explanation how it should work. His point 1 is exactly how i like to see it

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [July 31, 2021, 9:09am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/17 "2021-07-31T09:09:11Z")

</div>

> [@robertklep](#):
>
> But I do agree that synchronous execution would make flows more predictable: it doesn’t really make sense to have, for instance, a card that calculates the value of a variable and a following card that uses that new value to be started concurrently, as they do now

For these situations I split up the flow  
(I really like [to split up flows](https://community.homey.app/t/how-to-structure-your-flows/25109) 🤪)

1. Calculate the value of a variable
2. When a variable has changed use that new value in the execution of the flow

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 31, 2021, 9:11am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/18 "2021-07-31T09:11:06Z")

</div>

> [@tb1962](#):
>
> @JeeHaa has a good and simple explanation how it should work. His point 1 is exactly how i like to see it.

Like I’m trying to explain, point 1 completely ignores the existence of condition cards.

Also, a bit later on in the post they elaborate point 1: _“I guess effectively the same as multiple identical flows triggering on a different WHEN event”_. For which I’ll refer back to my post and how condition cards will cause issues with this.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 31, 2021, 9:15am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/19 "2021-07-31T09:15:43Z")

</div>

Yeah, that’s how it works now, but I think that for most people (especially beginners) it’s counterintuitive to have to structure flows like that.

---

<div class="post-metadata">

**Author:** ![tb1962](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tb1962/32/7888_2.png) [@tb1962](https://community.homey.app/u/tb1962)\
**Post date:** [July 31, 2021, 9:35am UTC](https://community.homey.app/t/request-additional-options-for-flow-logic/41601/20 "2021-07-31T09:35:28Z")

</div>

The reason i would like to see an option for multiple flow triggers is simplification. Currently I have more than 500 flows and 110 scripts on my Homey pro. And it happend to be even more. But i have moved Sonos, Samsung TV, Philips hue, climate control and other things to an old macmini. This way i could simplify flows considerably

Multiple triggers could limit that number of flows significant.

I tend to keep my flows as simple as possible. I have flows like: when triggerA then start flowB, and another flow: when triggerB then start flowB, and another flow…

Thats what could be simplified

[Next page](https://community.homey.app/t/request-additional-options-for-flow-logic/41601.md?page=2)
