Xiaomi Temperature Sensor: Full Instructions for Configuring and Using

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.

ModelProtocolprecisionAutonomyCompatibility
Mijia LYWSD03MMCBluetooth 5.0±0.3°C / ±3% humidityUp to 2 years (CR2032)Mi Home, Home Assistant (with firmware)
Xiaomi Aqara WSDCGQ11LMZigbee (demands gateway)±0.3°C / ±3% humidityUp to 1.5 years (CR2032)Mi Home, Home Assistant, Apple HomeKit
Mijia LYWSDCGQBluetooth 4.0±0.5°C / ±5% humidityUp to 1 year (CR2032)Only Mi Home (obsolete)
Xiaomi ClearGrass CGG1Zigbee 3.0±0.2°C / ±2% humidityUp 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.

📊 What is the Xiaomi Temperature Sensor You Are Using?
Mijia LYWSD03MMC
Aqara WSDCGQ11LM
ClearGrass CGG1
Other
I haven't bought it yet.

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:

  1. Install Xiaomi Miio integration or Zigbee2MQTT (depending on the sensor protocol).
  2. 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

  1. Remove the sensor from the package and remove the protective film from the battery compartment.
  2. Press and hold the button on the case (if any) for 5 seconds until the indicator flashes blue.
  3. The sensor will automatically go into pairing mode (this will indicate the rapid blinking of the LED).

Step 2.Add to Mi Home

  1. Open the Mi Home app and go to Devices → Add Device (+).
  2. Select the category "Sensors" → "Temperature and humidity".
  3. 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)

  1. Download the firmware. ATC_MiThermometer GitHub.
  2. Connect the sensor to the PC through USB-BLE adapter (e.g, CC2540).
  3. 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).
  4. 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)

  1. Install. Zigbee2MQTT to the server with Home Assistant (instructions on the official website).
  2. Connect the Zigbee Coordinator (for example, CC2652P) server-side.
  3. Add the sensor to the network via the web interface Zigbee2MQTT, pressing "Permit Join" and holding the button on the sensor.
  4. 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?
MAC-The Bluetooth sensor address can be found in several ways: 1. Through the nRF Connect application (Android/iOS) — Scan the device, the name will contain "LYWSD03MMC". 2. Through the terminal command. Linux/macOS: hcitool lescan 3. On Windows, use the Bluetooth utility LE Explorer from Microsoft Store. Address will be in format XX:XX:XX:XX:XX:XX (for example, A4:C1:38:12:F5:89).

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 premisesRecommended seatWhat to control
Bedroom.On the bedside table.Temperature for comfortable sleep (18–22)°C)
ChildishOn the wall 1 meter from the cribHumidity (40–60%) and temperature (20–22)°C)
Kitchen.At a distance from the plate (for example, on the shelf)Control of humidity during cooking
GreenhouseIn 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:

  1. Place the Xiaomi sensor next to a mercury or electronic thermometer (e.g., Xiaomi Mijia iHealth).
  2. Wait 30 minutes to stabilize the readings.
  3. 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

  1. At Mi Home, go to Automation. → Add → Smart scene.
  2. Set the condition: “If the temperature < 20°C".
  3. Add the action: "Switch on [your heater]."
  4. 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 causeDecision
Sensor's not connecting.Battery or Bluetooth lockdown is dischargedReplace the battery, check the permissions in Mi Home
The readings are "hanging"Weak signal or gateway overloadReset the gateway, bring the sensor closer.
Temperature jumpsExternal heat sources or sensor malfunctionCheck the placement, test with a reference thermometer
Sensor shuts down at nightEnergy conservation by iOS/AndroidTurn off battery optimization for Mi Home
Not working at Home AssistantWrong token or firmwareCheck the log. Zigbee2MQTT, re-flash the sensor

If the sensor has stopped responding:

  1. Remove and re-insert the battery.
  2. Press and hold the reset button (if any) for 10 seconds.
  3. Remove the device from Mi Home and add again.

How to Reset the Aqara Sensor WSDCGQ11LM factory-wise?
1. Remove the battery for 30 seconds. 2. Put the battery back in and press the button on the case immediately. 3. Hold it for 15 seconds until the indicator flashes red 3 times. 4. The sensor will reset and be ready for a new setup.

FAQ: Frequent questions about Xiaomi temperature sensors

Can I use the Xiaomi sensor on the street?
Most models (e.g., most models, LYWSD03MMC) They are not designed for the street: their body is not sealed, and electronic components are sensitive to moisture. WSDCGQ11LM protected IP54), But even it is recommended to place it under the canopy.
How often does the sensor send data?
The frequency of update depends on the model: LYWSD03MMC: every 10 minutes (can be changed up to 1 minute via custom firmware). WSDCGQ11LM: every 5 minutes (configured in the gateway).ClearGrass CGG1: Every 2 minutes. The more frequently the updates are, the faster the battery runs out.
Can I connect the sensor to Apple HomeKit?
There is no direct support for HomeKit, but there are workarounds: Use Home Assistant with HomeKit Controller integration. Set up Mi Home + HomeBridge on Raspberry Pi. For Aqara sensors, connect them via Aqara Hub gateway M2, It has native support for HomeKit.
How many sensors can be connected to a single Xiaomi gateway?
The official limit for Xiaomi Gateway 3 is 32 devices, but in practice, if you exceed 15-20 sensors, lags and packet loss begin. Zigbee2MQTT with a strong coordinator (e.g., a, CC2652P).
How to extend the life of the battery?
Battery life (usually) CR2032) can be increased: 🔋 Reduce the frequency of the sensor survey (e.g., to 1 time-in 30 minute). 📴 Turn off unnecessary notifications in Mi Home. 🌡️ Use batteries with higher capacity (e.g. Panasonic) CR2032 no-name). ❄️ If the sensor is used in an unheated room, select a low temperature model (e.g. ClearGrass). CGG1 before -20°C).