Logic nodes

Logic nodes route flow based on conditions and comparisons. If you are new to reading nodes, start with how nodes work.

If

Branches flow based on a boolean condition.

IfExecuteConditionTrueFalse
Inputs
ExecuteFlow
ConditionBoolean
Outputs
TrueFlow
Runs when Condition is true.
FalseFlow
Runs when Condition is false or not connected.

Compare

Compares two values using the selected operator.

CompareExecuteValue AValue BDoneResult
Inputs
ExecuteFlow
Value AAny
Value BAny
Outputs
DoneFlow
ResultBoolean
True when A [operator] B holds.
Properties
Operator
==, !=, <, <=, >, >=. Default ==.

If both values can be read as numbers (including text such as "5"), they are compared as numbers and tiny floating-point differences are ignored. Otherwise both are compared as case-sensitive text. If neither input has a value, ==, <=, and >= return true; if only one has a value, only != returns true.

And

Returns true if both inputs are true.

AndExecuteABDoneResult
Inputs
ExecuteFlow
ABoolean
BBoolean
Outputs
DoneFlow
ResultBoolean
True only when A and B are both true.

Or

Returns true if either input is true.

OrExecuteABDoneResult
Inputs
ExecuteFlow
ABoolean
BBoolean
Outputs
DoneFlow
ResultBoolean
True when A, B, or both are true.

Not

Inverts a boolean value.

NotExecuteValueDoneResult
Inputs
ExecuteFlow
ValueBoolean
Outputs
DoneFlow
ResultBoolean
True when Value is false, and false when it is true.

An unconnected boolean input reads as false, so an unconnected Not outputs true.

Switch

Routes flow to one of several outputs by matching a value against configured cases.

SwitchExecuteValueCase 1Case 2Case 3Case 4Default
Inputs
ExecuteFlow
ValueAny
Outputs
Case 1 … Case NFlow
Runs when Value matches that case. One output per case.
DefaultFlow
Runs when no case matches.
Properties
Case Count
Number of case outputs, 1 to 20. Default 4.
Case 1 Value … Case N Value
Text to match for each case.

Value is converted to text and compared exactly (case-sensitive) with each case in order. The first match wins. Cases with an empty value never match.

Change Detector

Compares the current value with the value from the previous run.

Change DetectorExecuteValueResetDoneChangedPreviousCurrentRisingFalling
Inputs
ExecuteFlow
ValueAny
ResetBoolean
When true, forgets the previous value.
Outputs
DoneFlow
ChangedBoolean
True when Value differs from the previous run.
PreviousAny
CurrentAny
RisingBoolean
True when a boolean went from false to true.
FallingBoolean
True when a boolean went from true to false.
Properties
Ignore String Case
Treat text that differs only by case as unchanged. Default off.
Number Tolerance
Numbers within this amount of each other count as unchanged, 0 to 1. Default 0.

The node remembers the last value between runs. The first run after the flow starts, or after a reset, always reports Changed as false because there is nothing to compare against yet.

Contributors

Thank you to everyone who has helped improve this documentation.