The Xiaomi Mijia LYWSD03MMC is a small square thermometer and hygrometer with an LCD, powered by a CR2032 coin cell. Out of the box it talks to the Mi Home app and sends its readings encrypted. Home Assistant can read the stock firmware through the Xiaomi BLE integration, but only if you give it the device's encryption key.
There is a popular alternative: the open-source firmware by the developer pvvx, published in the ATC_MiThermometer repository. You install it over Bluetooth from a web page, without opening the case or soldering anything. After that the thermometer broadcasts its readings in the open BTHome format, which Home Assistant picks up on its own, and you get settings that the stock firmware does not have: temperature and humidity offsets, adjustable broadcast intervals, a clock screen and a log of measurements stored on the device.
This guide covers the whole process and, just as importantly, the hardware revisions where it gets harder than the many older tutorials suggest.
Before you buy more of them
The LYWSD03MMC has been made in several hardware versions, and the newest ones changed the picture. The pvvx README carries two warnings worth reading before you order a batch:
- Units with hardware version B1.5 or B1.6, sold since March 2025, are marked as not recommended, because of high current consumption and a low-contrast display. B1.6 units also ship with original firmware that is incompatible with the older hardware versions.
- Xiaomi's stock firmware 2.1.1_0159 (and, according to the project, other new 2.1.1_xxxx versions) blocks the simple flashing route. To install custom firmware on it, you first have to register the thermometer in Mi Home and pull its keys from the Xiaomi cloud. The details are in step 3 below.
If you already have older units, flashing usually takes a couple of minutes per thermometer. If you are buying new ones, you may get a unit that needs the longer procedure, and you cannot check which version you have until it arrives.
The same firmware also supports other thermometers: the Xiaomi Miaomiaoce MHO-C401, the Qingping CGG1 and CGDK2, the Xiaomi MJWSD05MMC and a growing list of Tuya models. The full list of supported devices is kept in a separate repository. The steps below describe the LYWSD03MMC. Other models differ mainly in how you put them into pairing mode.
What you need
- A computer or Android phone with Bluetooth and Google Chrome, Microsoft Edge or Opera. Flashing uses the Web Bluetooth API, so other browsers will not work.
- A fresh or well-charged battery. The README says that on the LYWSD03MMC the battery level must be above 40% for a reliable connection and flashing, because the cheaper hardware revision has little power reserve.
- Home Assistant with a working Bluetooth integration: a built-in or USB Bluetooth adapter on the host, or ESPHome Bluetooth proxies (more on proxies at the end).
Step 1: prepare the browser
Open the flasher page, TelinkMiFlasher.html. You do not need to download any files from GitHub. The page offers the right firmware for the detected device.
On Android, Windows and Linux you also need to turn on an experimental browser feature. In Chrome, open chrome://flags/#enable-experimental-web-platform-features, set Experimental Web Platform features to Enabled and restart the browser. Without this flag the page may connect but fail later in the process.
Step 2: connect and activate
- Models with a button need a long press first, to clear old bindings. The LYWSD03MMC has no button, so you can go straight to connecting.
- On the flasher page, press Connect. The browser shows a list of nearby Bluetooth devices. Choose the one called
LYWSD03MMCand keep the thermometer close to the computer. - Once connected, a Do Activation button appears. Press it. This step runs the key exchange that the stock firmware requires, and the flasher sets a new bindkey for the device.
Activation alone already has a use. According to the Home Assistant Xiaomi BLE documentation, the bindkey generated by the pvvx flasher works with Home Assistant, but the Mi Home app stops recognising the thermometer until you remove it and add it again there. If you only want the stock firmware working in Home Assistant, you can stop here, note the key and add the device through the Xiaomi BLE integration. For BTHome and the extra settings, continue.
Step 3: flash the custom firmware
On an older unit, press the Custom Firmware ver x.x button and then Start Flashing. The progress bar takes a short while. When it finishes, the thermometer restarts and changes its Bluetooth name to something like ATC_F02AED.
If the unit runs stock firmware 2.1.1_0159, the process described in issue #602 applies instead:
- Add the thermometer to the Mi Home app.
- Get its keys from the Xiaomi cloud with a tool such as Xiaomi Cloud Tokens Extractor.
- Connect to the thermometer in TelinkMiFlasher, enter Device known id, Mi Token and Mi Bind Key, and select Login.
- Choose the
ATC_vNNfirmware and run the update.
If this fails, the project says you need to update the original firmware first. For B1.5 and B1.6 units sold since March 2025, the instructions say to flash the offered Original_OTA_... file as an intermediate step. After that intermediate update the screen does not work, but Bluetooth does, so you repeat the procedure from step 3, this time without updating the Xiaomi firmware again.
Flashing is reversible. The README states that you can go back to the original firmware at any time, by selecting the original firmware file in the same page.
Step 4: choose BTHome and set the thermometer up
Connect again, this time to the new ATC_... name. The page now shows the configuration options. The ones that matter most for Home Assistant:
- Advertising Type: choose BTHome. The firmware also offers Xiaomi, ATC and Custom formats, but the README notes that only BTHome and the Xiaomi format work with Home Assistant's built-in integrations. The others need the custom Passive BLE Monitor component. The project has also announced that from version 6.0 only BTHome v2 will be supported, so other formats are worth avoiding in new setups.
- Temperature and Humidity offset: a correction added to the readings, for example
-1.4lowers the temperature by 1.4 °C. Before setting it, leave the thermometer next to a reference you trust for a few hours, in the same place and away from sunlight or a radiator. - Comfort, Show batt, Clock: which screens the display cycles through. Set time sends the current time to the device for the clock screen.
- Advertising and measurement intervals and transmit power. With the defaults on the LYWSD03MMC (a broadcast every 2.5 seconds and a measurement every 10 seconds) the README lists an average current of 14-15 µA and over a year on a CR2032. Shorter intervals or a higher transmit power shorten that time. Settings from +3 to +10 dB need a stronger power supply than a coin cell.
Press Send Config to save the changes on the device. Set default followed by Send Config restores the defaults.
One setting to leave alone unless you know your hardware supports it: Bluetooth 5 LE Long Range. It increases range, but Home Assistant's Bluetooth integration does not fully support Bluetooth 5, and Web Bluetooth in Chrome cannot yet scan for Bluetooth 5 devices. If you enable it by accident, take the battery out and put it back: the thermometer then returns to normal Bluetooth 4.2 mode.
Step 5: add it to Home Assistant
With BTHome selected, Home Assistant does most of the work. The BTHome integration discovers devices on its own once the Bluetooth integration is running. Go to Settings > Devices & services. The thermometer should appear under Discovered. Confirm it, and you get entities for temperature, humidity and battery.
If you want the broadcasts encrypted, enable encryption for the BTHome format in the flasher and copy the bindkey. During setup, Home Assistant asks for the 32-character hexadecimal key. Without it, anyone within Bluetooth range can read the temperature in your room. That is harmless for most people, but encryption costs nothing apart from storing one more key.
The firmware also saves measurements in a ring buffer in flash memory, up to 20,000 records, averaged over an interval you choose. You can read and chart them from the same flasher page. This is handy for a thermometer that sits outside the range of Home Assistant, for example in a cellar or a car.
Reception: adapter or ESP32 proxy
The thermometer only broadcasts and Home Assistant only listens, so reception quality decides how often the values update. The two sources disagree here, and you should know both views.
Home Assistant recommends ESPHome Bluetooth proxies on ESP32 boards to extend Bluetooth coverage, and many people use them with these thermometers. The pvvx README takes the opposite position. It advises against ESP32-based receivers, saying that they cannot receive BLE at full speed, that ESPHome misses many advertising packets and that connected ESP32 devices drain the thermometers' batteries. It recommends a USB 2.0 High Speed Bluetooth adapter instead, especially with many BLE devices.
In practice, passive listening through a proxy is a different case from an active connection, and occasional missed broadcasts do not matter much when the thermometer sends one every 2.5 seconds. If you see long gaps in the history, add a receiver closer to the thermometer or try a USB adapter on the Home Assistant host before blaming the firmware.
The README also warns about storage wear: frequent BLE updates mean many writes to the database and to BlueZ files. With a few dozen devices, it is worth excluding entities you do not need from the recorder or recording them less often.
Common mistakes
- A weak battery during flashing. Below about 40% the LYWSD03MMC loses the connection. Change the cell first.
- The experimental flag not enabled, or a browser without Web Bluetooth, such as Firefox or Safari.
- Leaving the Xiaomi or ATC format on. The device works in other tools but does not appear in Home Assistant's BTHome integration.
- Setting the offset after a few minutes. Temperature and humidity settle slowly. Compare after a few hours.
- Ordering new units expecting the old, quick procedure. Recent hardware may need the Mi Home registration route or may not be worth flashing at all.