IF Else
The IF Else block runs one of two program branches based on a Boolean condition. Use it when a program should continue differently for true and false.
Typical use cases
- Trigger a notification only when a condition is met.
- Start different actions depending on a sensor value.
- Split a flow into two paths based on a device state.
- Run a separate action for both the true and false cases.
Inputs
| Input | Type | Description |
|---|---|---|
Start | Trigger | Evaluates the condition and forwards the trigger to one of the two outputs. |
Condition | Boolean | Determines whether the True or False output is triggered. |
Condition can be connected to the Boolean output of another block. When it is not connected, a fixed value can be selected directly in the block. The default is false. Connecting an input disables the local selector and uses the connected value instead.
Outputs
| Output | Type | Behaviour |
|---|---|---|
True | Trigger | Triggered when Condition is true at the time the block starts. |
False | Trigger | Triggered when Condition is false at the time the block starts. |
Exactly one output is triggered for every incoming Start trigger. The block does not return a Boolean value; it controls the program flow through trigger connections.
Configuration
- Connect a trigger, for example from a time, watch or device block, to
Start. - Connect a Boolean value to
Condition, or selecttrueorfalsedirectly. - Connect
Trueto the actions for a condition that is met. - Connect
Falseto the actions for a condition that is not met. - Validate and start the program.
An output may remain disconnected when no action is required for that case.
Example: temperature warning
A temperature comparison should decide whether to send a warning whenever a trigger arrives:
- Configure Compare Values with
temperature > 28. - Connect its Boolean result to
Condition. - Connect a suitable trigger to
Start. - Connect
Trueto a notification block. - Leave
Falsedisconnected or connect an action that clears the warning.
If the temperature is above 28 °C when the block starts, the True branch runs. Otherwise, the False branch runs.
Notes and troubleshooting
Startonly accepts trigger connections;Conditiononly accepts Boolean values.- Changing
Conditiondoes not trigger the block by itself. Branching occurs on the nextStarttrigger. - If the wrong branch runs, check the current value supplied to
Condition. - Do not connect both case-specific actions to the same output.
Related blocks
- Logic — combines multiple Boolean conditions.
- Compare Values — creates a Boolean condition from a numeric comparison.