Xiaomi’s temperature sensors have become an integral part of the smart home ecosystem because of their accuracy, compactness and affordable price. These devices not only allow you to monitor indoor climate, but also automate the work of heaters, air conditioners or fans through scenes in the Mi Home or Home Assistant. However, many users face difficulties when connecting first: the sensor is not detected by the system, shows incorrect values or quickly discharged. In this article, we will analyze all the stages of settings from unpacking to integration with other devices, and also reveal hidden functions that are not written in the official documentation.
The peculiarity of Xiaomi sensors (for example, models Mijia Bluetooth Temperature and Humidity Sensor 2 or Xiaomi Aqara Temperature Sensor) is their hybrid communication: they can work both over Bluetooth and through the gateway Xiaomi Gateway (depending on the version). This imposes limits on range and compatibility with other platforms. We will discuss in detail which models are compatible with which gateways, how to circumvent firmware restrictions and what to do if the sensor “hang” after the update.
If you are just planning to buy, note: new versions of sensors (for example, Mijia). LYWSD03MMC) Supports direct connection to Home Assistant without gateway via custom firmware. LYWSDCGQ) They require the Xiaomi Gateway or the Aqara hub to be available, and that's a critical difference, which we'll talk about later.
1.What Xiaomi Temperature Sensors Are: Model Comparisons
Xiaomi’s ecosystem offers more than 10 models of temperature and humidity sensors, but only 5 of them are relevant in 2026. The main differences lie in the communication protocol, measurement accuracy and platform compatibility.
| Model | Protocol | precision | Autonomy | Compatibility |
|---|---|---|---|---|
| Mijia LYWSD03MMC | Bluetooth 5.0 | ±0.3°C / ±3% humidity | Up to 2 years (CR2032) | Mi Home, Home Assistant (with firmware) |
| Xiaomi Aqara WSDCGQ11LM | Zigbee (demands gateway) | ±0.3°C / ±3% humidity | Up to 1.5 years (CR2032) | Mi Home, Home Assistant, Apple HomeKit |
| Mijia LYWSDCGQ | Bluetooth 4.0 | ±0.5°C / ±5% humidity | Up to 1 year (CR2032) | Only Mi Home (obsolete) |
| Xiaomi ClearGrass CGG1 | Zigbee 3.0 | ±0.2°C / ±2% humidity | Up to 3 years (ER14250) | Mi Home, Home Assistant, Tuya |
Key conclusions on selection:
- 🔹 For autonomous operation without a gateway, choose LYWSD03MMC — Connect directly to your phone or Home Assistant via Bluetooth.
- 🔹 If you already have an Aqara ecosystem or Xiaomi Gateway, it’s the best option. WSDCGQ11LM — It transmits data more consistently through Zigbee.
- 🔹 For maximum accuracy (for example, for greenhouses or aquariums) ClearGrass is suitable. CGG1 faultlessly ±0.2°C.
Important: Bluetooth sensors (for example, LYWSD03MMC) They can't run in the background on iOS because of Apple's restrictions. iPhones will require a gateway or Android device as a hub.
2. Preparation for setting up: what to do before connecting
Before you start setting up, follow the mandatory preparatory steps to avoid typical errors:
- 📱 Update the Mi Home app to the latest version (at the time of writing 6.5.400 is current.
- 🔋 Check the battery: even if the sensor is new, the factory film on the battery contacts can block the power.
- 📶 Make sure you have a stable Internet connection: you will need access to Xiaomi servers to connect via the gateway (domain api.io.mi.com).
- 📍 Place the sensor correctly: avoid direct sunlight, heat radiators or drafts – this distorts readings.
If you are using Home Assistant, please prepare:
- Install Xiaomi Miio integration or Zigbee2MQTT (depending on the sensor protocol).
- Get a token for the Xiaomi Gateway (if required) through the Miio-cli utility.
Common error: Many users try to connect the sensor LYWSD03MMC It's only Bluetooth, but it's a gateway, and it leads to endless search for the device in Mi Home.
Remove the protective film from the battery|
Update Mi Home to the latest version|
Check stability Wi-Fi/Bluetooth|
Place the sensor 1-2 meters from the phone/gateway|
Prepare a token for Home Assistant (if necessary)-->
3. Step-by-step instruction: how to connect the sensor to the Mi Home
Let’s look at the most popular model, Mijia. LYWSD03MMC (Bluetooth for sensors on Zigbee (e.g. Aqara) WSDCGQ11LM) The algorithm is similar, but requires a pre-connection gateway.
Step 1. Activation of the sensor
- Remove the sensor from the package and remove the protective film from the battery compartment.
- Press and hold the button on the case (if any) for 5 seconds until the indicator flashes blue.
- The sensor will automatically go into pairing mode (this will indicate the rapid blinking of the LED).
Step 2.Add to Mi Home
- Open the Mi Home app and go to Devices → Add Device (+).
- Select the category "Sensors" → "Temperature and humidity".
- Follow the instructions on the screen: confirm the flashing of the indicator on the sensor and wait for the pairing to be completed.
Step 3: Linking to the room and setting up notifications
- Once connected, assign a sensor to a room (such as a "bedroom" or "children's room"). This is necessary for automatic scenes to work.
- In the device settings (⚙️ → Notifications) enable the option “Warn for critical values” and set thresholds, for example: Temperature < 18°C → "Insert the heater", Humidity > 70% → "Activate the air dehumidifier".
If the sensor is not located:
⚠️ Note: on Android, check that Bluetooth and GeoData are enabled and Mi Home is given location permission. on iOS, additionally allow the app to access Bluetooth in privacy settings.
💡
If the sensor LYWSD03MMC If you don't connect to Mi Home, try using alternative software like Mi Fit or Zephyr (for Android), these apps sometimes "see" the device where the underlying software fails.
4.Setting up the sensor in Home Assistant: bypassing restrictions
Xiaomi doesn’t officially support direct integration of its sensors with Home Assistant, but there are workarounds. LYWSD03MMC) through Zigbee2MQTT (for Aqara).
Method 1. firmware custom software (for Bluetooth sensors)
- Download the firmware. ATC_MiThermometer GitHub.
- Connect the sensor to the PC through USB-BLE adapter (e.g, CC2540).
- Start the firmware command: python mithermometer.py --mac XX:XX:XX:XX:XX:XX --type LYWSD03MMC --write (substitute XX:XX:XX:XX:XX:XX on MAC-address of your sensor).
- Once firmware is in place, the sensor will broadcast data in an open format that can be read through the Home Assistant via integration. BLE Monitor.
Method 2: Connecting through Zigbee2MQTT (for Aqara)
- Install. Zigbee2MQTT to the server with Home Assistant (instructions on the official website).
- Connect the Zigbee Coordinator (for example, CC2652P) server-side.
- Add the sensor to the network via the web interface Zigbee2MQTT, pressing "Permit Join" and holding the button on the sensor.
- Home Assistant sensor will appear automatically as an entity sensor.temperature_....
⚠️ Warning: After the custom software firmware is firmware, the sensor will stop working in the Mi Home. USB-BLE adapter.
How to find out MAC-sensor?
5. Optimal placement of the sensor: where and how to install
The right placement of the sensor is critical to accurate readings, and even the most sensitive sensor will lie if it's not installed correctly.
- 🌡️ Height: optimally 1.2-1.5 meters from the floor (human breathing level). Avoid installation on the floor or under the ceiling.
- 🚫 What to avoid: Direct sunlight (overheating of the case), near radiators, cookstoves, refrigerators, in closed cabinets or behind curtains (air circulation is disturbed).
- 📶 For stable signal, if the sensor is running through the gateway, the maximum distance is 10 meters in line of sight. Walls and furniture reduce the radius to 3-5 meters.
Examples of proper placement:
| The premises | Recommended seat | What to control |
|---|---|---|
| Bedroom. | On the bedside table. | Temperature for comfortable sleep (18–22)°C) |
| Childish | On the wall 1 meter from the crib | Humidity (40–60%) and temperature (20–22)°C) |
| Kitchen. | At a distance from the plate (for example, on the shelf) | Control of humidity during cooking |
| Greenhouse | In the shadows, at the plant level. | Soil and air temperature |
💡
If the sensor shows an inflated temperature, check it for a "heat island": put a thermometer next to it and compare it.°C refers to an external heat source (e.g., from a router or charger).
Calibration of the sensor: how to check and correct the readings
Even new sensors can give an error ±1°C. To verify accuracy, conduct a test with a reference thermometer:
- Place the Xiaomi sensor next to a mercury or electronic thermometer (e.g., Xiaomi Mijia iHealth).
- Wait 30 minutes to stabilize the readings.
- Compare the values. If the difference is greater than 0.5°C, calibration required.
Calibration at Mi Home:
Unfortunately, the standard Mi Home app doesn't have a manual calibration function.
- 🔧 For Home Assistant: Use the offset setting in the sensor configuration: sensor: - platform: mqtt name: "Temperature Offset" state_topic: "zigbee2mqtt/Sensor/Temperature" unit_of_measurement: "°C" value_template: "{{ (value | float + 0.5) | round(1) }}" (substitute + 0.5 corrected).
- 📱 For Mi Home: Create a virtual sensor through Yandex Alice or Google Assistant that will add/subtract a fixed value.
⚠️ Note: if the sensor shows a knowingly unrealistic value (e.g., 50)°C in the room, it's a sign of a hardware malfunction.
7 Automation: How to use the sensor in smart home scenes
The main value of temperature sensors is automation of climate control. Let's consider 3 ready-made scenarios for Mi Home and Home Assistant.
Scenario 1: Automatic control of the heater
- At Mi Home, go to Automation. → Add → Smart scene.
- Set the condition: “If the temperature < 20°C".
- Add the action: "Switch on [your heater]."
- Save the scene called "Bedroom Heat."
Scenario 2: High humidity alert (for children)
- 📲 In Home Assistant, add configuration.yaml: automation: - alias: High humidity in the nursery trigger: platform: numeric_state entity_id: sensor.humidity_nursery above: 65 action: service: notify.notify data: message: "Humidity in children {{states('sensor.humidity_nursery') }}%! Turn on the dehumidifier."
Scenario 3: Timer and temperature ventilation
Create a scene that will include a fan if:
- Temperature. > 25°C,
- And the time between 12:00 and 18:00 (the hottest hours).
In Mi Home, this is done through a "scheduling". + Conditions, in Home Assistant - through time_pattern and numeric_state.
💡
For stable scenes, make sure that all devices (sensor, heater, fan) are tied to the same room in the Mi Home.
8. Typical problems and their solution
Even when set up correctly, Xiaomi's sensors can be unstable. TOP-5 problems and ways of eliminating them.
| Problem. | Possible cause | Decision |
|---|---|---|
| Sensor's not connecting. | Battery or Bluetooth lockdown is discharged | Replace the battery, check the permissions in Mi Home |
| The readings are "hanging" | Weak signal or gateway overload | Reset the gateway, bring the sensor closer. |
| Temperature jumps | External heat sources or sensor malfunction | Check the placement, test with a reference thermometer |
| Sensor shuts down at night | Energy conservation by iOS/Android | Turn off battery optimization for Mi Home |
| Not working at Home Assistant | Wrong token or firmware | Check the log. Zigbee2MQTT, re-flash the sensor |
If the sensor has stopped responding:
- Remove and re-insert the battery.
- Press and hold the reset button (if any) for 10 seconds.
- Remove the device from Mi Home and add again.