Comparison component is used to compare data coming from triggers and continue execution only when a given condition is satisfied. Data can be compared either to static values, coming from constants, or to dynamic data taken from other assets. Actions that are executed are enveloped inside the comparison component, in its YES and NO areas - Yes, for actions that should be executed when the condition is satisfied, and No when its not. Any action component can be dragged into these areas.
Once the threshold such as Temperature > 23 is reached, actions contained in YES area will be executed once. Only after the temperature falls below 23, and passes the threshold again, the actions be executed once again. Same execution logic goes for actions contained in NO.
- The component name is shown for convenience.
- Shrink / Expand toggles the size of the component. Shrinking components lets you create more space on the screen and presents you the whole rule at a glance.
- Comparison operator is one of standard mathematical operators: =, <, >, <=, >=, <>. You can choose them from a dropdown after clicking on the operator that’s currently visible. On numbers, they work as you would expect; on strings, they compare by string sorting order - a is “less than” b. For booleans, it does not make much sense to have anything other than equality, so operators are replaced with “is”.
View docs will always get you to this page.
- Remove component removes the device from the list of triggers.
- Branching action areas work the same as the ACTIONS area you know from before. The difference is that the actions won’t be executed every time the rule is triggered, but only when the condition in comparison is reached.
- Actions area is still available for you to drag additional actions to the rule. When more than one action is included in the rule, all actions are executed when the rule is triggered.