Xiaomi Human Presence Sensor integrated into Home Assistant

This helped me a lot. Thank You

Thank you.

Hey Guys,
For those that are using Shelly Devices gen 2 or more those serve as BLE proxy as well!!! these are working very well. muvh better than any Shelly motion device! lets see the battery!

have you updated to the latest firmwarw? i had that issue as well and now seems fine.

Does anyone have this working consistently and reliably?

I just received mine from AliExpress and set it up to use with my Bluetooth proxies. The reporting is so inconsistent it’s completely useless!

I had really high hopes for this sensor and I’m curious if maybe I just got a bad unit

1 Like

Same for me. Set it up a few days ago as I need a few sensors in locations that will be difficult to wire in. It’s not far from the Bluetooth dongle but it seems to get stuck in either detected or clear state. I don’t have hub so not sure if it is working but just not reporting to HA.

I tried geek mode and it did pick up some interference so made the adjustments. The location has no chance of moving curtains etc so not sure what the interference was but it hasn’t actually made any difference.

I have ordered some M5stack atoms so will set up as Bluetooth proxies and see if it helps. But I am a bit disappointed so far.

Update 04Mar2025:

After hours of troubleshooting i have finally made it on my MacOS. What helped me:

  1. the python extraction tool has some issues → install the add on on your Home Assistance to add the terminal → copy paste the terminal into your HAOS terminal as described above
  2. When the extraction tool asks for your login, don’t use your e-mail but your Xiaomi Account ID (you can view that when you are logged into your Xiaomi account → Personal Info).

Hope that helps you also!

Hey Guys,
i have some struggle to make this sensor works.
It was auto detected and successfully added to Xiaomi BLE. And that’s all. As you can see, i only have the diagnostic: “Signal strength”.
I was not asked for an bindkey.

What i am missing?

HA Version: Core 2025.3.3

Follow these steps and you will be oké.

Thanks for your fast answer. Just for me, Region Chinese mainland is not available. So Chinese is still the same?

If you don’t have the option “Chineese Mainland” (I had) then try Chineese, it might work.

Wow… im not notice that the sensor needs an update. With Region “China” (german) it works. I was asked about the BLE Key. Now i have to wait, if i read this forum correctly, right?

If all went oké the entities should enter over time, just have some patience.

1 Like

Hello! I have 2 of these sensors and they both get stuck on detected like 2 or 3 times per day. I respected the install recomandation, I have 2 shellyes at BT proxies at about 3 meters from each of the sensors but they still remain stuck on detected a lot. Any tips? Until now, they do not seem to work very well.

1 Like

Thanks for your guide.

I got it to be found on the Mi App, however, it seems the page to “power through” the request for a gateway to be added first had been updated to only show a message on how to obtain a gateway.

So, in essence, the device can’t bind and can’t get past that screen.

Any ideas?

Can I use the laptop Bluetooth adapter? My ha is installed on VMware on the laptop itself

Do I still need the Bluetooth device if I purchase the central gateway?

I can only seem to the the Lux sensor to show up one ive added the BLE Key into home assistant. Has anyone figure why this happens ?

Hi, Before I initiated a return for a faulty sensor please can I get a Sanity check. I’ve added the Xiaomi BLE integration, added the sensor to the Xiaomi app, it pairs fine, detects in HA and then add the BLE key and all seems fine.

The luminescence seems to work fine as does signal strength with both updating regularly and the luminescence changing correctly to the conditions within a second or so.

However despite turning on Geek Mode which detects no interference unless I walk in the room when it then does detect me correctly just to check the detection vaguely works, the sensor immediately goes to Detected and then counts up to 5 minutes since detection and doesn’t change for hours. If I reset by removing the battery it briefly clears but then immediately goes back to Detected.

Everything points to me it being a faulty sensor. What do others think?