Xiaomi Bluetooth Home Assistant Integration is now possible Natively! As you may know there is one Xiaomi Bluetooth temperature & humidity sensor that becomes very popular lately, because it is cheap, it is good looking and its battery last forever.

On top you can add this Xiaomi T&H sensor to your Home Assistant relatively easy. The whole process of adding the Xiaomi to Home Assistant becomes even easier as there is a new native method that I’m about to show you today. 

What is needed?

First, let’s see what is needed:

Of course you will need the Xiaomi Bluetooth Temperature & Humidity sensor itself.

Xiaomi TH Sensor LYWSD03MMC
Xiaomi TH Sensor LYWSD03MMC

The device is really small, it uses a Bluetooth for a wireless communication and it is battery powered. I have one here that is running for about a year now and the battery is still at 100% which is either amazing or there is something wrong with the battery reporting.

Xiaomi TH Sensor at 100 percent battery
Xiaomi TH Sensor at 100 percent battery

But even if it is the latter and the battery die right now, it is still impressive as one year of operation with one cheap CR2032 battery is a pretty good deal in my honest opinion. 

One more important thing about the sensor before we move on is the fact, that the Bluetooth communication of the device is encrypted. If you want to use it outside the Xiaomi Home Mobile app you have to extract the encryption key of the device.

Don’t worry that is very easy and I will show you later how to do it from your browser.

From where to buy Xiaomi T&H?

If you want to buy the Xiaomi Bluetooth Temperature & Humidity sensor I can recommend to get it from AliExpress, where it costs around $5 US dollars including the shipping and a battery.

If you decide to buy Xiaomi TH sensor, from the links below, which are affiliate links and affiliate links means that I will get a small commission from your purchase with no additional cost for you.

It will be kind of Win-Win situation.

Xiaomi Bluetooth Home Assistant Integration just Got Easier! 1

If you buy a bundle of 3, 4 or 5 devices at once you can lower the price to around $4 dollars per piece. Of course, the prices may vary depending of the season and the current promotions, so I can suggest to click the images above & below and check the current prices.

Xiaomi Bluetooth Home Assistant Integration just Got Easier! 2

Home Assistant with Bluetooth support is also needed

The next thing that you will need is a running Home Assistant preferably on a device that have embedded Bluetooth. Perfect example for this is a Raspberry Pi 4.

If your Home Assistant device is not having a Bluetooth you will need a Bluetooth dongle. You can find some compatible dongles below (Affiliate links again).

Home Assistant Webinar

If you don’t have Home Assistant yet, now is the best time to invite on my free Home Assistant webinar where I will talk about 4 official ways to get Home Assistant + 1 not official, but super easy and fast way to start Home Assistant in under 5 minutes.

⬇️ Go to my other website and register right now as I said it is absolutely free ⬇️

https://automatelike.pro/webinar

Summary of what is needed for this Project?

As summary, you will need:

  1. One or more Xiaomi Bluetooth Temperature & Humidity sensors.
  2. Home Assistant installed on a device with a Bluetooth support. 
  3. You have to download the free Xiaomi Home app (available in Apple App Store and Google Play) and to add the Xiaomi T&H Sensor inside before continue further.

Just for your information, adding the device inside Xiaomi Home app is a pretty standard procedure that do not need a lot of explanations. 

How to Get Xiaomi Bind key?

If you already have everything that is described above, then it is time to get the Encryption key or also known as Bind key of the Xiaomi device, so we can have a native Xiaomi Bluetooth Home Assistant integration.  

Thanks to Aaron (https://www.youtube.com/channel/UCY0kJ-Z-811fqTddJ72w-WA), who made a web page that can extract the Bind/Encryption key, this whole procedure is like a walk in a park. Everything is done wirelessly and all that is needed is the Xiaomi sensor and your phone or laptop browser.

Below are the steps to get the Bind Key:

  • I used a Chrome browser on my laptop (Safari browser didn’t want to work for some reason).
  • I opened the following URL – https://atc1441.github.io/TelinkFlasher.html
  • Then I clicked on the Connect button, I removed the Xiaomi TH battery and I put it back to wake the device up.
  • I searched for LYWSD03MMC in the dialog, I select it and I clicked on the Pair button
Pairing the Xiaomi TH with a browser to extract the bind key
Pairing the Xiaomi TH with a browser to extract the Bind key
  • Then I waited few seconds to see the Status Connected label and I pressed on the Do Activation button.
  • Few seconds later I received my Xiaomi Bind key that I copied in a safe place, as I will have to use it later for the native Xiaomi Bluetooth Home Assistant integration.
Extracted Xiaomi Blnd Key that is going to be used for the Xiaomi Bluetooth Home Assistant integration
Extracted Xiaomi Blnd Key Xiaomi that is going to be used for the Bluetooth Home Assistant integration

Xiaomi Bluetooth Home Assistant Integration

Until very recently to add the Xiaomi Temperature & Humidity sensor in Home Assistant you have to install a custom integration called Passive BLE Monitor, which is still working fine and if you want to know more you can check my older article about the same Xiaomi sensor and Home Assistant and how to get everything working

But that above is the old way of integrating Xiaomi T&H with Home Assistant! Now, I will show you the new one.

How to add Bluetooth Integration in Home Assistant?

Starting from Home Assistant 2022.8 there is a new Bluetooth integration which allows adding a lot Bluetooth devices natively including this Xiaomi Temperature & Humidity sensor.

Native Bluetooth Integration in Home Assistant
Native Bluetooth Integration in Home Assistant

To add the Home Assistant Bluetooth integration, either click on the My Home Assistant link below or find the Bluetooth in the Integrations section > Add Integration.

Open your Home Assistant instance and start setting up a new integration.

After adding the Bluetooth integration above, every Bluetooth device that is in range and that is recognized by Home Assistant should be auto-discovered and ready to be configured.

Adding the Xiaomi T&H in Home Assistant

Have in mind that in order to preserve battery power, the Xiaomi Temperature sensor is transmitting signals in intervals. That means the Xiaomi sensor is sleeping most of the time and it will not be auto-discovered by Home Assistant immediately.

So, you either have to wait a bit or you can try to wake the device by removing and inserting the battery to force this initial discovery.

After the Xiaomi TH is found by Home Assistant you will be able to see it in the list of integrations as LYWSD03MMC Xiaomi BLE integration.

Adding Xiaomi TH in Home Assistant using Bluetooth integration
Adding Xiaomi TH in Home Assistant using Bluetooth integration

Just click on the Configure button under the Xiaomi BLE integration and then on Submit button in the shown message.

Now, you are almost ready, but prepare to have a good break. You can go watch some YouTube or you can read a good book for half an hour or so.

In my case after around 30-45 minutes I saw a reconfiguration request from Home Assistant for the same LYWSD03MMC Xiaomi BLE device. That is because the Bluetooth communication is encrypted and it needs the Bind or Encryption key to be unlocked.

Reconfigure the Xiaomi BLE Home Assistant Integration to make it work
Reconfigure the Xiaomi BLE Home Assistant Integration to make it work

REQUEST FOR HELP – START!
I was unable to force this Xiaomi BLE T&H Sensor reconfiguration request in Home Assistant. If you know how this above can happen faster – please, don’t hold it for yourself and share that trick in the comments bellow!
REQUEST FOR HELP – END!

Anyways, I clicked on the Reconfigure button and I pasted my Xiaomi Bind key and I was ready.

Pasting the Bind key in Home Assistant so the Bluetooth communication to be unencrypted
Pasting the Bind key in Home Assistant so the Bluetooth communication to be unencrypted

Not long after, I was able to see the Xiaomi Temperature & Humidity readings inside Home Assistant. As well as the battery percentage which was still at 100% even after a lot of waking up the device and tests.

Xiaomi BLE readings in Home Assistant where everything is working as expected
Xiaomi BLE readings in Home Assistant where everything is working as expected

General Summary

Of course, as everything else this Xiaomi sensor have some drawbacks, and the main of them are:

  • Refresh rate of the readings in Home Assistant is not fast, it is around every 15 minutes or something.
  • The Xiaomi T&H sensor have to be relatively close to your Home Assistant device. Around 5-10meters.

Despite the above drawbacks, I think that the Xiaomi LYWSD03MMC T&H BLE sensor is a great device and I can two hands recommend it as one of the cheapest and easiest way to get your Temperature & Humidity readings in Home Assistant.

And this is the affiliate link again, If you wan to buy the sensor – https://s.click.aliexpress.com/e/_DlsUEQv

Outro + Question for YOU!

Can you share in the comments section what do you like or what you don’t like about this Xiaomi sensor it will be very interesting to me and other who are reading this.

Don’t forget to subscribe for my Newsletter where you will receive similar articles on weekly basis.

Thank you for reading. I’m Kiril and I’m done writing. Bye!


11 Comments

Gandalf · 16/09/2022 at 1:16 pm

I reloaded the bluetooth integration. Could be a lucky punch but my reconfiguration request popped up in 5 minutes or so

    KIril Peyanski · 18/09/2022 at 9:00 am

    That is like magic Gandalf 🙂 Good job!

Max · 24/10/2022 at 6:15 pm

Still waiting for reconfiguration request …. several days. I have tried to reloaded. No way. Any help ?

    KIril Peyanski · 25/10/2022 at 9:18 am

    that is not good, I don’t know start from the beginning. Delete the sensor from Xiaomi App, then add it again, then extract the Key again and try add it to HA.

Eduardo · 25/10/2022 at 1:11 am

I have tried the tutorial as described but getting an error saying tha “The provided bindkey did not work, sensor data could not be decrypted. Please check it and try again.”. Any help?

    KIril Peyanski · 25/10/2022 at 9:14 am

    Start from the beginning. Delete the sensor from Xiaomi App, then add it again, then extract the Key again and try add it to HA.

slug · 04/11/2022 at 1:36 pm

Unfortunately, it does not work for me either. I tried with 5 of these thingies, but no success – I was able to add them via Xiaome BLE Integration but I alwas get only one entity which is ‘signal strength’, no temp, no humidity. I give up, this seems to be no reliable solution at all – but thanks a lot for your tutorial!

Ashokan · 20/11/2022 at 1:05 pm

Unable to connect getting message “The provided bindkey did not work, sensor data could not be decrypted. Please check it and try again.”
Thanks for the assistance in advance

Ash · 05/03/2023 at 12:06 pm

Nicely written up. I’m not clear why I need the Xiaomi app. It says at the start that it’s one of the requirements but is not mentioned what for.

    Ash · 05/03/2023 at 12:30 pm

    My first of 5 is now working, thank you, didn’t need the app at all as is turns out.

Russell · 02/06/2023 at 7:34 am

Not working for me either. Every time I run the Teleink Flasher phone app and press “Do Activation” I get a different bindkey. I am using the stock Xiaomi firmware unaltered.

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *