Condition
This document explains the condition blocks in Flow.
Overview
In automation Flows, condition blocks are used to determine whether data, device states, or variables in the process meet specified criteria. Condition blocks form important control nodes for process branching.
Condition blocks typically have two output points, corresponding to whether the evaluation result is true (condition met) or false (condition not met). Only when a certain output path is activated will subsequent actions or branches be executed.
By configuring different types of condition blocks, you can flexibly achieve data comparison, logical operations, and other condition checks, enabling complex intelligent branching in automation processes and meeting diverse business needs.
In Flow, you can perform condition checks on the following:
- Device: Checks whether the current status or some data of a device meets the set condition, such as "Is the light on?" or "Is the temperature above the threshold?"
- Trigger Value: Reads the trigger value carried by the selected device trigger block in the current automation, compares it with the value set on this block, and continues from the met or not-met branch.
- Logic: Combines multiple yes/no conditions with AND, OR, XOR, and NOT. It can also compare any two values using equal to, not equal to, greater than, less than, greater than or equal to, or less than or equal to. After the check, the flow continues from the met or not-met branch.
- Time: Checks whether the current time is within a specified range (e.g., "Is it between 10:00 and 12:00 on Monday?") to implement time-based automation branches.
- Automation: Checks whether the selected automation is currently enabled or disabled, then continues from the met or not-met branch. This checks the enabled state, not whether the flow is running or whether this run succeeded.
Condition Block Outputs
Condition blocks usually have two outputs, representing the judgment results:
- True Output: When the condition is met (the result is true), the Flow proceeds from this output.
- False Output: When the condition is not met (the result is false), the Flow proceeds from this output. For example, you can perform certain actions when the device status meets the criteria, and otherwise perform a different set of actions, thereby improving flexibility and intelligence in automation.
Device
When the automation reaches this card, check whether a device property satisfies the comparison (e.g., "Is the light on?" or "Is the temperature above the threshold?"), optionally for a required duration. The automation continues from the true or false branch.
You can configure the device, its corresponding datapoint, status, or value, and set the relevant condition (such as equal to, not equal to, greater than, less than, etc.) to accurately determine the device state.
How to Use
-
In the left sidebar of the canvas, click the + button. Under Condition, select Device. In the device list, choose the device you want to check.
-
You will then see a list of available blocks for that device, which represent the readable datapoints for the selected device. Click the required block to add it to the canvas.
-
Click the first parameter on the block to select the condition (such as equal to, not equal to, greater than, less than, etc.).
tipThe available condition options vary depending on the type of device datapoint. For example, switch types generally support "equal to," "not equal to," etc., while value types also support "greater than," "less than," etc.
Click the second parameter to further specify the target value to monitor.
-
After configuring the above, make sure that at least one output (True or False) of the condition block is connected to another block (condition block or action block).
Trigger Value
This condition block reads the trigger value carried by a device trigger block already added to the current automation, compares it with the value set on this block, and checks whether the condition is met.
This condition block does not query the device's current state again.
Prerequisites
Add a device trigger block to the automation before using its trigger value in a condition.
How to Use
-
In the left sidebar, click +. Under Condition, select Trigger Value, then choose a device trigger block you have already added.

-
Click a trigger value condition to add it to the canvas.

-
On the block, set the first parameter to the comparison, such as equal to, not equal to, greater than, or less than.

-
Set the second parameter to the value to compare against.

-
Connect at least one output (True or False) to another condition block or action block.
Logic
There are two main types of logic-related condition blocks: Comparison and Logic Operation.
- Comparison blocks are used to determine the relationships between two sets of data (such as equal to, not equal to, greater than, less than, etc.), serving as condition checks for values, states, etc.
- Logic Operation blocks are used to logically combine the results of multiple conditions (e.g., outputs from multiple condition blocks) using logical relationships like AND, OR, XOR, or NOT, enabling more complex branching structures.
You can flexibly use these blocks to build various logical conditions as needed.
Comparison
A comparison checks two values, such as device data, a variable, trigger data, or a custom value. It can test whether they are equal, compare their size, or check whether a number rises or falls past a threshold. The flow then continues from the met or not-met branch.
How to Use
-
In the left sidebar of the canvas, click the + button. Under Condition, select Logic. Click Comparison to add the block to the canvas.
-
Click the first parameter on the block to select a device data item as value A from a dropdown list.
If you need to compare a variable, click the 🔗 icon to select the required variable from the variable list for the comparison.
-
Click the second parameter to set the comparison operator, such as greater than.
-
Click the third parameter to set value B, similar to value A.
-
After configuring, make sure that at least one output (True or False) of the condition block is connected to another block (condition block or action block).
Logic Operation
A logic operation combines multiple yes/no conditions using AND, OR, XOR, or NOT. AND requires all true, OR requires at least one true, XOR requires an odd number of true values, and NOT negates only the first condition. The flow then continues from the met or not-met branch.
How to Use
- In the left sidebar of the canvas, under Condition, select Logic and add a "Logic Operation" block.
- Click the Rule parameter on the block to select the desired logical operation from the dropdown menu (e.g., AND, OR, XOR, or NOT).
- Click the "+" button to add inputs to the logic operation block. The available boolean input sources include:
- Outputs from condition blocks;
- Boolean variables (global variables, local variables, and boolean device variables).
- After configuring, make sure that at least one output (True or False) of the condition block is connected to another block (condition block or action block).
Time
Among condition blocks, there are four main time-related types: Periodic Check, Date Type Condition, Annual Date Range Check, and Scheduled Check.
| Type | Description | Example |
|---|---|---|
| Periodic Check | Check whether the current time falls within the configured time range on selected weekdays, including ranges across midnight, then continue through the true or false branch. Times can be fixed or based on sunrise/sunset and offsets at the configured location. | Monday to Friday, 09:00-18:00 |
| Date Type Condition | Check whether today's date matches the selected type in the China calendar, using the system time zone. Evaluation fails when calendar data is unavailable and resumes after an update. | Workday (including make-up workdays) |
| Annual Date Range Check | Check whether today's date is within the annual range, including both endpoints. The range can cross into the next year. | Every year from November 19th to December 20th |
| Scheduled Check | Check whether the current time falls between the configured start and end date/time, including the boundaries, then continue through the true or false branch. Times can be fixed or based on sunrise/sunset and offsets at the configured location. | 2026/01/01 12:00:00 - 2026/01/02 13:00:00 |
How to Use
-
In the left sidebar of the canvas, under Condition, select Time. Click any block to add it to the canvas.
-
Configure the parameters:
-
For Periodic Check:
- Click the first parameter on the block to select which weekdays to check (multi-select supported).
- Click the second and third parameters to set the start and end times, respectively.
-
For Date Type Condition:
- Click the parameter on the block and select a date type: workday, statutory holiday, or rest day.
-
For Annual Date Range Check:
- Click the first parameter and select the start date (month/day).
- Click the second parameter and select the end date (month/day).
-
For Scheduled Check:
- Click the start parameter to set the specific start date and time.
- Click the end parameter to set the specific end date and time.
-
-
After configuring, make sure that at least one output (True or False) of the condition block is connected to another block (condition block or action block).
Automation
This block checks whether the selected automation is currently enabled or disabled, then continues from the met or not-met branch.
This checks whether the automation is enabled, not whether the flow is running or whether the automation run succeeded.
How to Use
-
In the left sidebar, click +. Under Condition, click Automation to add an automation condition block to the canvas.

-
Select the automation whose enabled state you want to check.

-
On the block, set the state to match:
EnabledorDisabled.
-
Connect at least one output (True or False) to another condition block or action block.