Saw this blog post/video the other day about the cheap Xiaomi BLE sensors. Been looking for something simple to measure temperature for a while now, and spent way too much on it already :-). These simple little devices offers temperature and humidity and a display for cheap!
Ordered six of them (in packs of three) and received them the other day. First thing I did was to re-flash one with the custom firware from this repo. Configuring the ESPHome settings for the ESP32-device to take the values from the sensor according to the blog post. However, having run for over 24 hours I still had no values from the sensor.
Opened up a new one from it's box and ran the discovery described in the repo, got the bind key and used that + it's mac address in ESPHome, leaving the firmware intact. And bang, I got values quite fast from the sensor.
No idea what the problem was for me with the ESP32/ESPHome/Custom firmware, but I didn't get any values. I could see it connecting in the logs from the serial terminal though.
Troubled on what to do to get it working I started reading all the open/closed issues in the repo.
Found these ones:
There is a pull request to ESPHome with the atc-custom component, if you configure the firmware in the custom mode.
https://github.com/atc1441/ATC_MiThermometer/issues/3#issuecomment-703787438
(So perhaps I'd have better luck with that?)
But the choice fell on flashing it back to the original firmware instead using the tool from the repo and the link in this issue:
https://github.com/atc1441/ATC_MiThermometer/issues/7#issuecomment-685851208
Will continue experimenting with the custom firmware as it was giving some really nice features!