Skip to main content

Logic Blocks

note

Screenshots in this guide may look slightly different from what you see on your device. Please follow the actual interface for reference.

Overview

In automation scenario configuration, if you want to determine whether to execute a step based on the combination results of multiple conditions, you need to use logic blocks, including: AND, OR, NOT, and Logical Operations.

The logic category includes the following blocks:

Logic blocks overview

AND

Feature

Use the AND block when you need all selected device boolean states to meet the conditions before triggering a step.

Components

AND block components

This is multi-point block, containing 2 input points (default), 1 output point, and 1 add button:

Connection Point or ButtonRequiredDescription
Input point AIt connects 1 boolean Point Data.
Input point BIt connects 1 boolean Point Data.
Add ButtonIt adds more input points to connect more Point Data.
Output PointIt connects to the step to be triggered when all conditions are met.

How to Use

AND block example

Here's how to use the AND block:

  1. Connect 2 boolean Point Data blocks to the left side of the block.
  2. Connect to Action blocks on the right side of the block. As long as all boolean Point Data blocks are true, this step will be triggered.
note

The AND block usage steps described in this section do not include time restrictions. If you need to add validity periods for state changes, please refer to the timer blocks State Duration - Control Devices Based on Logical Operation Results.

OR

Feature

Use the OR block when you need to trigger a step when some of the selected device boolean states meet the conditions.

Components

OR block components

This block is multi-point type, supporting 2 input points and 1 output point by default, with 1 add button inside the block:

Connection PointRequiredDescription
Input point AIt connects 1 boolean Point Data.
Input point BIt connects 1 boolean Point Data.
Add ButtonIt adds more input points to connect more Point Data.
Output PointIt connects to the step to be triggered when any condition is met.

How to Use

OR block example

Here's how to use the OR block:

  1. Connect 2 boolean Point Data blocks to the left side of the block.
  2. Connect to the Action block on the right side of the block. Only 1 boolean Point Data needs to be true to trigger this step.
note

The OR block usage steps described in this section do not include time restrictions. If you need to add validity periods for state changes, please refer to the timer blocks State Duration - Control Devices Based on Logical Operation Results.

NOT

Feature

Use the NOT block when you need to use the opposite value of a boolean state to control another state. This block will invert the boolean value of the input state and output it to the target state. For example:

  • Switch state is true → outputs false, light turns off.
  • Switch state is false → outputs true, light turns on.

Components

NOT block components

This is a dual-point block that requires no additional parameters:

Connection pointRequiredDescription
Input PointIt connects a boolean Point Data to pass a boolean value to this block.
Output PointIt connects a boolean Point Data to receive the opposite boolean value of the input data.

How to Use

NOT block example

Here's how to use the NOT block:

  1. Connect a boolean Point Data block to the left side of the block to get the boolean value of that variable.
  2. Connect a boolean Point Data block to the right side of the block to receive the opposite boolean value, thus controlling the device.

Logic

Feature

Use the Logic block when you need to compare two values to decide whether to execute an automation step.

This block supports the following comparison methods:

  • Greater than
  • Less than
  • Equal to
  • Greater than or equal to
  • Less than or equal to

Components

Logical operations block introduction

This is multi-point block with 1 configurable parameter:

Connection Point or ParameterRequiredDescription
In A (Input Point)Input A, the value to be compared. It can connect to 1 numeric Point Data or Numeric Variable.
In B (Input Point)Input B, the reference value, can connect to 1 numeric Point Data or Numeric Variable.
FunctionSelect comparison method:
  • Greater than: Input A > Input B
  • Less than: In A < Input B
  • Equal to: Input A = Input B
  • Greater than or equal to: Input A ≥ Input B
  • Less than or equal to: Input A ≤ Input B
True (Output Point)One of the two requiredIt connects to the step executed when the condition is true.
False (Output Point)One of the two requiredIt connects to the step executed when the condition is false.
Output (Output Point)It outputs the comparison result.

How to Use

Logical operations example

Here's how to use the Logic block:

  1. Connect two numeric parameters (Input A and Input B) to the left side of the block.
  2. Select a comparison method in the block (such as "Greater than").
  3. Connect the steps to be executed when judged as true or judged as false to the right side of the block.
  4. Connect a Boolean Variable block to the right side of the block to get the comparison result. This point can also connect to other blocks, such as AND and OR blocks.