If
Checks a condition and sends the run down true or false. Join several checks with and or or.
Kind
control:logicGroupFlow
Credits0.1 credits
Ports out2
How it looks
Settings
| Setting | Required | What it does |
|---|---|---|
| Continue down "true" whencondition | Yes | Build it from values in the run, like trigger.payload.celsius is greater than 30, or write it as an expression. It must come out as true or false. |
Ports
| Port | The run leaves by it when |
|---|---|
true | The condition held. |
false | It didn't. |
Example
Only at night
- Condition:
trigger.payload.luxis less than10. - Connect
trueto Send to clientlights.on, and leavefalseempty to end there.
Types are strictA number is never equal to the same digits as text, so
21.5 and "21.5" differ. Send numbers from the board as numbers.Problems you might see
| Code | Means |
|---|---|
LOGIC_CONDITION_NOT_BOOL | The condition came out as something other than true or false, like a number or text. |
EXPRESSION_EVALUATION_ERROR | A value it reads couldn't be worked out. |
Problems found when you publish stop the publish and point at the node. Problems while a run is going fail the node, and its On failure setting decides what happens next. See the error codes for the API's own.
See also
Starts when a client sends a message of a type you pick, optionally only when its values match, or have matched for a while.
Outdefaulttrigger:clientSets, increments or compare-and-sets a variable, local to the run or shared by every run.
Outdefaultcontrol:variableSplits the run into named paths that carry on side by side.
Outone per path you namecontrol:fork