Skip to content

Examples

Arie J. Godschalk edited this page Nov 15, 2026 · 1 revision

Examples

Home > Examples

Contents: Shared Flow · Return a result · Sequential · Debounce

Before you start

Complete the first named-Flow test. Use Advanced Flow, matching names, and matching card sizes. Save the Flows before running them normally; editor-only tests can introduce extra timing and may not represent a real triggered run.

Connect an error path to a visible notification. First use harmless notifications, not an important alarm or a device that could cause damage.

Several triggers, one shared Flow

Create one 1-size receiver named:

room-message

Connect its Text 1 tag to a notification's message.

For each real button or sensor trigger, add a 1-size Start Flowcard action:

  • Triggername: room-message
  • Text 1: that trigger's useful text tag, or a short message you choose
  • Wait to Finish: checked for the first test
Button A -> Start room-message, Text 1 = "Button A"
Button B -> Start room-message, Text 1 = "Button B"

room-message receiver
  -> notification message <- receiver's Text 1

Expected result: each button uses the same receiver but passes its own message. This avoids trying to read a tag from the wrong original trigger branch.

Based on the community explanation of multiple trigger branches.

Send a result back

  1. Create a 1-size receiver named demo-return with Default execution.
  2. Connect it to the 1-size Return action. Its formatted text begins Return to.
  3. Connect the receiving trigger's Return ID tag to the Return card's Return ID field.
  4. Set returned Text 1 to Result ready., Number 1 to 7, and Yes/No 1 to checked.
  5. Create a sender with Start → 1-size Start Flowcard, name demo-return, and Wait to Finish explicitly checked.
  6. After that starter, add a notification using the starter's Text 1 output.
  7. Save both and run the sender.
Sender: Start demo-return, wait checked
  -> notification <- starter's returned Text 1

Receiver: demo-return started
  -> Return to <- receiver's Return ID
       Text 1 = Result ready.
       Number 1 = 7
       Yes/No 1 = checked

Expected result when your Flow engine waits for the receiver: the sender's notification says Result ready., and its returned Number 1 is 7 and Yes/No 1 is true.

If results stay empty, check Return ID, waiting, and firmware behavior. The Return card does not itself end the receiver; put it last for a clear result.

Historical developer Flow showing a receiver passing values back to a waiting starter

Developer screenshot from the 2022 return-value announcement. Notice the circled Test value appearing on the starter's Text 1 output; our written example uses Result ready. instead. Older labels may mention a Flow Execution ID or an event name; the current required connection is the trigger's Return ID tag, as described above.

Run requests one after another

  1. Create a 1-size receiver named demo-queue.
  2. Set Execution to Sequential.
  3. Connect it to a notification containing its Text 1, followed by a one-second delay.
  4. Add three starter actions in separate test branches, all named demo-queue, with Text 1 values A, B, and C.
  5. Request them in that order, with a small gap between requests.
  6. Save and run normally.

Expected result when your engine waits for receiving Flows: A, then B after A's receiving branch completes, then C after B completes. The requests must actually arrive in that order; parallel branches are not a guarantee of A/B/C arrival order.

Historical developer sequential-execution Flow with shared receiver and log actions

Developer screenshot from the 2022 sequential example. It uses Simple Log and a five-second receiver delay; the quick test above uses notifications and a one-second receiver delay. Current labels and Homey timing may differ. Essential steps are written above.

For recording the order in a log, follow Simple Log's first-entry setup and sequential logging example. A log timestamp shows when a card logged its text, not when a physical speaker finished.

Limit a burst of updates

  1. Create a 1-size receiver named demo-latest.
  2. Set Execution to the option that executes the last one waiting.
  3. Set Debounce (ms) to 1000.
  4. Connect the receiver's Text 1 to a notification.
  5. Send A, B, and C within the first second.

Expected result: around the first interval boundary, C is the selected waiting request and the earlier requests are skipped. Do not send the starters as a waiting chain if you want a burst; that chain would wait between requests.

See the exact fixed-window behavior. The original debounce explanation includes older visual examples; avoid importing a historical template without checking its cards and your firmware.

Next steps

Clone this wiki locally