How to connect a temperature sensor to the Xiaomi gateway: the full guide 2026

Why you need a temperature sensor in the Xiaomi ecosystem

Xiaomi’s smart home system automates indoor climate control, and a key element of this automation is a temperature sensor. Connecting it to the Mi Home Gateway or Aqara Hub gateway, you can get accurate microclimate data, you can customize scenarios for heaters, air conditioners or ventilation, and you can receive notifications of critical changes. For example, the sensor will help prevent equipment from overheating in the server room or maintain a comfortable temperature in the children’s room.

However, many users have difficulty connecting for the first time: the gateway doesn’t see the device, the application gives an error, or the reading gets confused. In this article, we’ll look at all the steps of connecting from choosing a compatible sensor model to setting up automatic scripts, and focus on typical errors and how to fix them so that you can integrate the sensor into the smart home system without problems.

It’s important to understand that the connection process may vary depending on the gateway model (Aqara Hub M2, Mi Home Gateway 3) and the firmware version.We’ll look at the universal steps relevant to most Xiaomi devices in 2026, as well as pointing out the nuances for specific models.

What temperature sensors are compatible with Xiaomi gateways

Not all temperature sensors can be connected to Xiaomi gateways. The ecosystem supports devices with the Zigbee protocol (for Aqara and Mi Home) or Bluetooth Mesh (for new models).

  • πŸ”Ή Aqara Temperature and Humidity Sensor (WSDCGQ11LM) β€” The most popular version with support for Zigbee, accuracy Β±0,3Β°C.
  • πŸ”Ή MiJia Bluetooth Temperature and Humidity Sensor 2 (LYWSD03MMC) β€” It works via Bluetooth, requires a gateway with support BLE Mesh (such as Mi Home Gateway 3).
  • πŸ”Ή Aqara Temperature and Humidity Sensor P1 (TVOC) β€” Extended version with air quality sensor, compatible with Aqara Hub M2.
  • πŸ”Ή Xiaomi Mi Temperature and Humidity Monitor (ClearGrass) – a budget model, but with a shorter communication range.

Before buying, check the gateway firmware version: older models (such as the Mi Home Gateway 1) may not support new sensors. Also note regional limitations: some devices (such as Aqara for the Chinese market) require a server change in the Mi Home app.

⚠️ Note: Wi-Fi sensors (such as the Xiaomi Mi Smart Sensor Set) do not connect to gateways – they work directly through the router and are managed separately.

Sensor modelProtocolCompatible locksFeatures
Aqara WSDCGQ11LMZigbeeAqara Hub M1/M2, Mi Home Gateway 3Range up to 100 m, IP54 water protection
MiJia LYWSD03MMCBluetooth MeshMi Home Gateway 3, Aqara Hub E1Compact size, battery for 2 years
Aqara TVOCZigbeeAqara Hub M2Sensor. COβ‚‚ and formaldehyde
πŸ“Š What kind of Xiaomi gateway do you use?
Aqara Hub M2
Mi Home Gateway 3
Aqara Hub E1
Other
I don't know.

Preparing for the connection: what to do in advance

Before you start connecting, make sure that all the prerequisites are met:

  1. Update the gateway firmware. Go to the Mi Home app, select your gateway, and check for updates in Settings β†’ About the device. Outdated firmware may not support new sensors.
  2. Check the sensor power. Most models are powered by the CR2032 battery. Make sure it's installed correctly (plus up) and not discharged.
  3. Place the gateway and sensor in range, maximum distance between them is up to 10 meters (for Zigbee) or 20 meters (for Bluetooth) without obstacles, walls and metal objects can block the signal.
  4. Select an in-app server. Aqara sensors often require a China Mainland server. To change it, go to Profile β†’ Settings β†’ Region.

A critical mistake many users make is to try to connect the sensor to a gateway that is already connected to another Xiaomi account, in which case, first reset the gateway (press the button for 10 seconds before flashing a yellow light).

Updated the lock firmware|Checked the battery in the sensor.|Placed the devices in the operating area|Select the right server in Mi Home-->

Step-by-step: how to connect the temperature sensor

Consider a universal connection algorithm using the Aqara WSDCGQ11LM sensor and the Aqara Hub M2 gateway. For other models, the steps may differ slightly.

Step 1: Adding a sensor to the Mi Home app

1. Open the Mi Home app and go to the Devices tab β†’ Add the device (the + icon in the upper right corner).

2. Select Sensors category, then find your sensor model in the list. If it's not available, use Add Manual and type in the name.

3. Click Next and follow the instructions on the screen. The application will prompt you to activate the pairing mode on the sensor.

Step 2: Activation of the pairing mode

For Aqara sensors:

1. Hold the button on the sensor for 5 seconds until the indicator starts flashing blue.


2.If there is no button (like the LYWSD03MMC), remove and re-insert the battery.

For MiJia sensors:

1. Press and hold the button on the back for 3 seconds.


2. The indicator should flash green.

Step 3: Completion of the connection

1. Wait for the app to find the sensor (usually 10 to 30 seconds). If the search is delayed, check:

  • πŸ”‹ Distance between sensor and gateway (not more than 10 m).
  • πŸ“Ά Interference from other wireless devices (Wi-Fi, microwaves).
  • πŸ”„ Selecting the right server in Mi Home.

2. Once successfully connected, the sensor will appear in the list of devices. Name it (e.g., "Bedroom Sensor") and select a room.

πŸ’‘

If the sensor doesn’t connect, try rebooting the gateway: disconnect it from power for 30 seconds, then turn it on again.

Set up notifications and automatic scripts

Putting the sensor in is half the job, and to make it really useful, set up notifications and automation.

Notification of critical values

1. In the Mi Home app, select your sensor and go to Settings β†’ Notifications.

2 Set temperature thresholds (e.g. below +15Β°C or above +30Β°C) and humidity, and if you exceed them, you will receive a push notification on your smartphone.

3. For Aqara sensors, you can configure notifications in the Aqara Home app (more flexible settings, including email alerts).

Automation scenarios

Example 1: Automatically activate the heater.

Create a script according to the rule:

If the temperature is < 18Β°C,


Turn on a smart socket with a heater.

Example 2: High humidity ventilation.

IF humidity > 70%,


Turn on the exhaust fan for 30 minutes.

To create scripts, go to Profile β†’ Automation β†’ Create a script and select triggers (sensor) and actions (other devices).

⚠️ Note: If the scenario doesn’t work, check that all devices (sensor, socket, gateway) are in the same Mi Home or Aqara ecosystem. Cross-platform automation (e.g. between Mi Home and Google Home) requires additional customizations through the Mi Home or Aqara ecosystem. IFTTT.

How to export scripts to Aqara Home?
In the Aqara Home app, go to Automation β†’ Settings β†’ Export/Import. You can save the script to a file and upload it to another account or device. This is useful if you move settings to a new gateway or share a configuration with other users.

Typical errors and their solutions

Even with the right connection, users face problems. Let's look at the most common ones.

Problem.Possible causeDecision
Gateway doesn't find sensorSensor is not in pairing modeReboot the sensor (remove/insert the battery)
The testimony is confused.Interference from other Zigbee devicesChange the Zigbee channel in the gateway settings
Sensor shuts down.Weak battery signal.Replace the battery with a new one (even if the indicator shows charge)
No notifications.Incorrect server settingsChange region to China Mainland at Mi Home

If the sensor is connected, but the reading is obviously incorrect (for example, the temperature is +50 Β° C in the room), try:

  • πŸ”„ Reconnect the sensor to the gateway again.
  • πŸ“± Update the sensor firmware (if available in Settings) β†’ About the device).
  • 🌑️ Check the sensor in another room – it may be affected by direct sunlight or a heat source.

πŸ’‘

If the temperature sensor shows deliberately false values, most likely the problem is a hardware malfunction. In this case, contact Xiaomi with a purchase check - the device is subject to replacement under warranty.

Expanded capabilities: integration with other systems

Xiaomi’s temperature sensors can be integrated not only into the home ecosystem, but also into third-party smart home platforms.

  • 🏠 Home Assistant: Use the Xiaomi Miio component or Zigbee2MQTT gateway.
  • πŸ”„ Google Home / Alexa: Link your Mi Home account with Mi Home Skill (China Mainland server required).
  • πŸ“Š Grafana: Export temperature data through the MQTT and visualize the graphs.

For integration with Home Assistant:

  1. Install the Zigbee2MQTT addon.
  2. Add Xiaomi gateway as Zigbee coordinator.
  3. Configure the sensor configuration in the configuration.yaml file:
sensor:


- platform: mqtt




name: "Temperature Bedroom"




state_topic: "zigbee2mqtt/0x12345678/temperature"




unit_of_measurement: "Β°C"

This will allow the sensor data to be used in complex automations, such as climate control based on multiple conditions.

FAQ: Answers to Frequent Questions

Can I connect a temperature sensor without a gateway?
No, Aqara and MiJia sensors with Zigbee protocol or Bluetooth Mesh require a gateway to communicate with the application.The exception is Wi-Fi sensors (such as the Xiaomi Mi Smart Sensor Set), but they do not integrate into the Xiaomi smart home ecosystem.
How to reset the temperature sensor to factory settings?
To reset, hold the button on the sensor for 10-15 seconds until the indicator blinks 3 times. If there is no button (like the LYWSD03MMC), remove the battery for 1 minute, then insert back and immediately press the button (if there is one).
Why does the sensor show the temperature with a delay?
Zigbee sensors update data every 5-10 minutes to save battery. To get instant readings, press the button on the sensor, it will send data forced update. For Bluetooth sensors, the delay is usually less (1-2 minutes).
Can I use a single sensor with multiple gateways?
No, the sensor can only be paired with one gateway at a time, so if you need to duplicate data to another gateway, use integration via Home Assistant or MQTT.
How to increase the communication range of the sensor?
Use Zigbee repeaters (like Aqara or Xiaomi smart outlets) to relay the signal, increasing the coverage area, and avoid placing the sensor near metal objects or Wi-Fi routers at 2.4 GHz.