Skip to main content

Device 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

As the core of smart spaces, devices serve as the bridge connecting perception and response. Without devices, there would be no implementation of intelligence. In Aqara Studio, you can use device blocks to implement an "Event-Condition-Action" logic for monitoring device events and states, real-time device status retrieval, and device control, building flexible automation workflows.

The device category includes the following blocks:

Device blocks overview
note

Since device blocks depend on specific device capabilities, different devices may only support certain blocks.

Event

Feature

You can use this block to trigger subsequent operations when a device experiences an event (such as a button press or voice command reception) or enters a state (such as environmental data changes or door/window opening).

Components

Event block introduction

This block is single-output type, and serves as a trigger for your subsequent automation operations. You can configure event or state listener based on device support. The configuration parameters within the block vary as follows:

Connection Point or ParameterRequiredDescription
Target EventWhen monitoring events, set the target event here, such as greater than, less than, equal to, increase, etc.
Target ValueWhen monitoring events, set the comparison target value here.
Target StateWhen monitoring states, set the target state here.
Output PointConnect to the following step.

How to Use

Monitor 1 Event or State

  1. After selecting this block, the system will pop up a device selection window where you can view the available events and states.

    After checking 1 block, you can add the block anywhere on the canvas to start real-time monitoring.

    Add event state monitoring
  2. Set up monitoring by changing the properties within the block and connect the following step on the right side of the block.

    State monitoring example

Monitor Multiple Events and States

The following explains how to simultaneously monitor multiple device events and states, triggering subsequent workflows when any event or state occurs.

  1. Click the "Bulk" button next to the "Event" button.

    Select bulk
  2. Select the devices you need to monitor and click "Next step".

    Select devices
  3. Expand the devices, click the + button to add the events or states you need to monitor. After adding, click Confirm.

    Add points
  4. Set a scene name for this bulk monitoring.

    Set scenario name
  5. Click anywhere on the canvas to add this bulk monitoring block, as shown below:

    Set scenario name

Condition

Feature

You can use this block when you need to perform different operations based on the boolean result of determining whether a device is in a specific state (such as whether a switch is on).

Components

Condition block components

This block is multi-point type with 1 configuration parameter, 1 input point, and 2 output points. It directs the workflow to different paths based on query results. Details are as follows:

Connection Point or ParameterRequiredDescription
Query (Input Point)Connect to the step that triggers this state query operation.
Target StateSet the specific state to query, such as "on", "off".
True (Output Point) / False (Output Point)At least one of the two is connectedTrue: it connects to steps to be executed when device state matches the target state; False: it connects to steps to be executed when device state does not match the target state.

How to Use

Check 1 State

  1. After selecting this block, the system will pop up a device selection window where you can check the target device and its state in the list, then add the block anywhere on the canvas.

    Select device to get current state
  2. Connect the block that triggers this state query to the input point of this block.

    Set the target state you want to query within the block.

    Finally, connect two different subsequent operations based on query results: one for when device state matches the target state, and another for when it doesn't match.

    Set condition block

Check Multiple States

The following explains how to simultaneously check multiple states to trigger subsequent workflows.

  1. Click the "Bulk" button next to the "Condition" button.

    Select bulk
  2. Select the devices whose states need to be checked and click "Next step".

    Select devices
  3. Choose "Satisfy any conditions" or "Satisfy all conditions", expand the devices, and click the "+" button to add the states you need to check. After adding, click "Confirm".

    Add points
  4. Set a scene name for this bulk check.

    Set scenario name
  5. Click anywhere on the canvas to add this bulk check block, as shown below:

    Set scenario name

Action

Feature

Use this block when you need to make a device perform a specific action (such as turning lights on/off, adjusting brightness or color temperature).

Components

Action block components

This block is single-input type and serves as the end of your automation operations. Details are as follows:

Connection Point or ParameterRequiredDescription
Input PointConnect to the behavior that triggers device operation.
Device ParametersSet the device parameters you want to modify, such as switch state, cooling temperature, color temperature, etc.

How to Use

Perform 1 Action

  1. After selecting this block, the system will pop up a device selection window where you can check the target device and target action in the list, then add the corresponding action block anywhere on the canvas.

    Select device to execute action
  2. Connect the block that triggers this device operation to the input point of this block. Then, set the device parameters you want to modify within the block.

    Modify values on block

Perform Multiple Actions

The following explains how to add multiple actions.

  1. Click the "Bulk" button next to the "Action" button.

    Select bulk
  2. Select the devices that need to execute actions and click "Next".

    Select devices
  3. Expand the devices, click the "+" button to add the actions you need to execute. After adding, click "Confirm".

    Add points
  4. Set a scene name for this bulk operation.

    Set scenario name
  5. Click anywhere on the canvas to add this bulk operation block, as shown below:

    Set scenario name