private@homelab: ~/latest
Home Assistant · Zigbee2MQTT · local control
private@homelab:~$ cat guides/article.md
·
· ·
7–10 minutes
read

Xiaomi LYWSD03MMC: Local Home Assistant via pvvx & BTHome

Flash pvvx custom firmware on the Xiaomi LYWSD03MMC and add it to Home Assistant locally via BTHome — no Mi Home app, no cloud dependency.

Disclosure: This post contains affiliate links. If you buy through them, we earn a small commission at no extra cost to you.

Xiaomi LYWSD03MMC: Local Home Assistant via pvvx & BTHome

The Xiaomi LYWSD03MMC is a small battery thermometer with a temperature and humidity display. You can read it locally in Home Assistant using its stock Bluetooth firmware, or replace the firmware to use BTHome or Zigbee. Custom firmware gives you more control over reporting and display settings, but it is not a requirement for local access.

This guide focuses on pvvx firmware. Check the hardware revision and installed firmware before flashing: the same model name has been used for different boards, and the update path is not identical for all of them.

Reading the stock firmware locally

The stock firmware sends Xiaomi BLE broadcasts. Encrypted broadcasts require the sensor’s bindkey, but Home Assistant can decode them locally once it has that key. The Xiaomi BLE integration documents key retrieval and compatible tools. It does not send every reading to Xiaomi for decryption.

If stock reporting meets your needs, obtaining the key may be less work than changing firmware. Check the documentation for the installed stock version; some activation methods change the key or the sensor’s relationship with Mi Home.

Choose Bluetooth or Zigbee

Route Receiver Why choose it
Stock Xiaomi BLE Home Assistant Bluetooth adapter or compatible proxy Keep the supplied firmware; supply a bindkey where needed.
pvvx BTHome Home Assistant Bluetooth adapter or compatible proxy Use BTHome broadcasts and configurable BLE/display settings.
Custom Zigbee firmware A Zigbee coordinator with a supported integration Join an existing Zigbee network instead of extending Bluetooth coverage.

The receiver matters as much as the firmware. Check coverage where the sensor will live. A Bluetooth proxy must be able to receive the advertisement format you configure, while a Zigbee installation needs a suitable nearby parent router.

Check the board and firmware revision

The pvvx project documents multiple LYWSD03MMC revisions. Its notes specifically flag the newer B1.5/B1.6 variants for power-consumption and display issues, and give a separate first-update procedure for newer stock firmware. These notes are model-specific, so follow them before selecting a binary.

Read the information reported by the flasher and compare it with the project’s compatibility notes. Do not force an older image because the case looks the same. If the board is not identified confidently, leave it on stock firmware until you have a supported procedure.

The board label can be misleading. The project lists B1.4, B1.7, B1.9, and B2.0 as the conventional variants; the 2025 boards marked B1.5/B1.6 use different display hardware and receive the internal identifier B1.1 in custom firmware. A PCB marked B1.6 and a custom-firmware report of B1.1 can therefore describe the same unit, rather than a failed flash.

If you can safely open the battery cover, record the board marking and compare it with the project’s hardware table and the flasher’s detected information. Do not select a binary solely from a retailer’s photograph or the printed B1.6 label. The newer stock-firmware activation procedure also matters: version 2.1.1_0159 requires Mi Home registration and IDs according to the project.

Path A: Flash pvvx firmware, add via BTHome

BTHome keeps the device on Bluetooth. Prepare a fresh battery, a nearby computer with Bluetooth, and a browser that supports Web Bluetooth. Save any current bindkey and configuration you may need later. Firmware changes can clear settings or break the existing Mi Home association.

Step 1: Follow the flasher’s update path

  1. Open the project’s Telink flasher in a supported browser and connect to the correct sensor. Close other applications that are holding a Bluetooth connection to it.
  2. Read the detected hardware and firmware details. When the supported flow offers Do Activation, use it first, then the Custom Firmware option for the detected sensor. Newer stock versions can require the linked first-update procedure before these steps work.
  3. Use the firmware offered for the detected device. Keep the sensor close and leave the browser connected until the operation finishes.
  4. Reconnect after the update and confirm that the readings and display still work.

The LYWSD03MMC does not have the pairing button found on some other thermometers. Do not copy a “hold the button” instruction from another model. If connection or activation fails, use the project’s recovery guidance rather than repeatedly forcing a flash.

Step 2: Switch advertising format to BTHome v2

Reconnect to the renamed sensor after flashing, select BTHome v2 under the advertising type, and use Send Config to apply the change. Begin with a conventional BLE advertising mode supported by your receiver; long-range or extended advertising options require compatible hardware.

BTHome can be unencrypted or encrypted. For encrypted broadcasts, retain the configured key and supply it to Home Assistant. Unencrypted broadcasts are simple to receive, but nearby receivers can read them too. Calibration offsets and advertising intervals are also available in pvvx BLE firmware; they are not exclusive to Zigbee.

Step 3: Add to Home Assistant via BTHome integration

With Home Assistant’s Bluetooth integration working, look for the sensor under Settings → Devices & services. Add the discovered BTHome device, or choose Add integration → BTHome and follow the prompts. The integration documentation describes encrypted-sensor setup.

Check temperature and humidity, then wait for any less frequent battery report. If discovery is missing, check ignored discoveries, advertisement format, receiver range, and whether the browser is still connected. Changing several radio settings at once makes that diagnosis harder.

Path B: Convert to Zigbee (Zigbee2MQTT)

Converting to Zigbee changes the protocol used by the thermometer. It does not make a BLE receiver into a Zigbee coordinator. Choose a firmware project with explicit support for your board, then follow that project’s converter and recovery instructions.

When to choose this path

Zigbee is useful if you already have reliable mesh coverage near the sensor and would otherwise need another Bluetooth proxy. Keeping BLE is often simpler when Bluetooth reception already works. Either can deliver readings locally; neither guarantees better battery life in every installation.

Installing Zigbee firmware

The ZigbeeTLc project documents its supported update paths. A compatible BLE installation can use the Telink flasher to install an appropriate Zigbee image, but newer stock versions may need additional activation steps first. Firmware from another project is not interchangeable just because it targets the LYWSD03MMC.

Read the recovery procedure before changing protocols. Keep the exact board identification and downloaded image details with your notes so that a later update does not become guesswork.

Adding to Zigbee2MQTT

  1. Enable joining in Zigbee2MQTT before completing the conversion.
  2. Allow the newly flashed sensor to join and finish its interview. Use the project’s reset instructions if it does not join; a battery reinsert alone is not necessarily a factory reset.
  3. Record the model reported by the custom firmware and check the matching Zigbee2MQTT device definition.
  4. Compare the reported readings with the display, then place the sensor in its intended room.

Reports and configuration

Temperature, humidity, and battery information are the main reports to check. Custom firmware may also expose calibration, comfort-display, measurement-interval, or display settings. The exact Home Assistant entities depend on the firmware and converter you installed, so use its current device page instead of assuming every conversion exposes the same controls.

For an offset, compare readings over time with a reference instrument in the same location. A one-off difference between sensors in different parts of a room is not enough to establish a calibration error.

For pvvx’s conversion, look for the LYWSD03MMC-z definition. It lists temperature, humidity, battery percentage and millivolts, Celsius/Fahrenheit display mode, smiley/comfort controls, display enablement, and a measurement interval. Other firmware projects can match a different definition.

The comfort limits control the display’s smiley indicator; they do not control a heater or establish a healthy temperature range. Software temperature/humidity offsets are separate from display preferences. Inspect the Exposes tab and test one setting before assigning Home Assistant controls to it.

Returning to Bluetooth

The conversion is not universally one-way. ZigbeeTLc documents compatible Zigbee OTA files for returning supported devices to BLE. The correct image type and hardware match still matter. A different firmware project or a failed update may require wired recovery, so check your exact route before relying on an easy return.

What changes after flashing

Custom firmware gives you choices about advertising, measurement frequency, display behaviour, and calibration. Battery life will vary with those settings, hardware revision, signal conditions, and the cell itself. Reduce unnecessary reporting rather than treating a quoted year of battery life as a guarantee.

The readings travel through your local receiver and Home Assistant integration. That is separate from the online tools or accounts used during initial setup. The internet-dependency guide covers that difference. If you prefer a sensor designed for Zigbee from the outset, see the Aqara WSDCGQ12LM guide.

FAQ

Do I need to flash it to avoid the cloud? No. Stock Xiaomi BLE can be read locally once the required bindkey is available. Flashing is a choice about protocol and configuration.

Can it broadcast BLE and Zigbee at the same time? Do not assume that for the firmware paths in this guide. Choose the project and build for the protocol you intend to use.

Why are readings present but battery missing? Battery data may be sent less often. Check the actual broadcasts or Zigbee reports before resetting a working sensor.

Which revision should I buy? Ask the seller for the actual revision and compare it with the firmware project’s compatibility notes. A listing that only says LYWSD03MMC does not settle that question.


Hardware referenced:
Xiaomi LYWSD03MMC on Amazon

local-firstHome Assistantno-cloud