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

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?

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’s your solution imho. It’s a condition:
-trigger A, or trigger B, or trigger Y
-charging is not active
-charger power is below 1 Watt
-action cards
-Notification “Flow X is triggered, but ignored, while the charger was already started”

1 Like

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.

1 Like