# How to handle multiple triggers resulting in one action in advanced flow

**URL:** https://community.homey.app/t/how-to-handle-multiple-triggers-resulting-in-one-action-in-advanced-flow/89283
**Category:** Flows
**Tags:** homey-pro, advancedflow
**Created:** [September 12, 2023, 3:02pm UTC](https://community.homey.app/t/how-to-handle-multiple-triggers-resulting-in-one-action-in-advanced-flow/89283 "2023-09-12T15:02:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)
#### Post date: [September 12, 2023, 3:02pm UTC](https://community.homey.app/t/how-to-handle-multiple-triggers-resulting-in-one-action-in-advanced-flow/89283/1 "2023-09-12T15:02:38Z")

</div>

So I have this advanced flow with multiple trigger cards, which can be be triggered at the same time, but only one following action is needed.

(For instance my car charging flow has a trigger for a calendar event and a trigger for a low price event. Both can trigger on the same moment (hour). The rest of the flow has to be done only once (check car status if cable connected and start charging))

How to handle this in advanced flow?

My thoughts so far:

- Because each trigger gets his own “instance” of the flow, and isn’t aware of the other instance running from the other trigger, this can’t be solved with creative combination of ALL, ANY, WAIT cards I suppose.
- Only solution I can think of so far is to create a “flip-flop” boolean (homey logic variable or bit flip from Better Logic app), which is set by the first trigger, does a countdown for a specified time (few seconds) and resets itself. And every trigger does a check on this bit flip variable (semphore in fact)
- Are there existing apps supporting this specific “semaphore” functionality as advanced flow card (check bitflip, if false set bit flip and reset after [input] seconds with true and false output based off bit flip status) and if not, could it be a nice feature request for Better Logic app of Countdown timer app to support this?
- I realize the remaining part of the advanced flow cannot use optional tag values from trigger cards (if the exist), because you cannot predict which trigger card “wins”. So this is only to start the rest of the flow

Anyone any suggestions or reflections on this question?

---

<div class="post-metadata">

### Author: ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)
#### Post date: [September 12, 2023, 6:32pm UTC](https://community.homey.app/t/how-to-handle-multiple-triggers-resulting-in-one-action-in-advanced-flow/89283/2 "2023-09-12T18:32:42Z")

</div>

> [@Torch1969](#):
>
> cannot use optional tag values from trigger cards (if the exist), because you cannot predict which trigger card “wins”.

Those tags can always be found under the device name as well. I mean, they always _are_ available when you can’t use the “local” tags.

> [@Torch1969](#):
>
> and start charging

There’s your solution imho. It’s a condition:  
When…  
-trigger A, or trigger B, or trigger Y  
And…  
-charging is not active  
Or…  
-charger power is below 1 Watt  
Then…  
-action cards  
Else…  
-Notification “Flow X is triggered, but ignored, while the charger was already started”

---

<div class="post-metadata">

### Author: ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)
#### Post date: [December 16, 2023, 8:46am UTC](https://community.homey.app/t/how-to-handle-multiple-triggers-resulting-in-one-action-in-advanced-flow/89283/3 "2023-12-16T08:46:27Z")

</div>

> [@Peter\_Kawa](#):
>
> Those tags can always be found under the device name as well. I mean, they always _are_ available when you can’t use the “local” tags

There is one (more complicated) alternative.

Use the app Advanced Triggers and for each trigger feed a start card with the value of the trigger tags.

The ‘when started’ card will always have the values in its tags and you can continue the flow with those.

Advanced Triggers is especially useful if you want to sequentially carry out multiple triggers or if you want to avoid too many runs within a certain period.
