Conditional Gates

Virtual "circuit breakers" for your flows that act as advanced latches.

What are Conditional Gates?

Conditional Gates are virtual logic gates (Go / No Go circuits) that exist purely in memory. They allow you to pause flows until a specific "Gate" is opened (set to GO).

Think of them as a traffic light for your flows:

Flow Cards

Conditional Gate (Wait for GO)

Type: CONDITION

Pauses the flow until the specified gate becomes GO.

Parameters:

  • Default State: The initial state if this gate hasn't been used before (usually NO GO).
  • Timeout: How long to wait for the gate to open. (Set to 0 for instant check without waiting).
  • Gate Name / ID: The unique name of your circuit (e.g., "KitchenMode", "NightLatch").
Note: Gates persist in memory! If you set "Default: GO", the gate will remain GO until you explicitly close it using the Modify card. The "Default" setting only applies the very first time the gate is created.

Check Gate State

Type: CONDITION

Instantly checks if a gate is currently GO or NO GO without waiting.

Parameters:

  • Gate Name / ID: Select the gate to check.
  • State: The state to check for (GO or NO GO).
Use case: Use this card when you need to branch your flow based on current gate state without waiting. Perfect for "if gate is open, do X, otherwise do Y" scenarios.

Modify Conditional Gate

Type: ACTION

Changes the state of a gate (Open/Close) or updates the timeout of active waiters.

Parameters:

  • Gate Name / ID: Select the gate to modify.
  • New State: Set to GO (releases waiting flows), NO GO (stops future flows), Toggle, or Don't change.
  • New Timeout: Update the timeout for currently waiting flows. Set to -1 to leave unchanged.

Output Tag:

  • Gate State (GO): Boolean - true if the gate is GO after the action, false if NO GO.
Tip: To read the current gate state without changing it, use "Don't change" for New State and -1 for New Timeout. The output tag will give you the current state.

Examples

1. Manual Approval (The "Ask Permission" Flow)

Trigger a flow, but wait for manual confirmation (e.g., via a button or app) before proceeding.

Flow 1: The Request

WHEN: Washing Machine finished
AND: Conditional Gate "EmptyWasher" (Default: NO GO, Timeout: 1 hour)
THEN: Send push notification "Washer emptied!"

Flow 2: The Approval

WHEN: Virtual Button "Washer Emptied" pressed
THEN: Modify Conditional Gate "EmptyWasher" -> Set to GO
THEN: Modify Conditional Gate "EmptyWasher" -> Set to NO GO (Reset for next time)

2. "Latch" Logic

Prevent a flow from running until a specific condition (Latch) is set, and queue up requests.

WHEN: Motion Detected
AND: Conditional Gate "NightModeLatch" (Default: NO GO, Timeout: 0)
THEN: Turn on hallway lights dimly

Here, Timeout 0 acts as a filter. If "NightModeLatch" is NO GO, the flow stops immediately. If it is GO, lights turn on.