The Xiaomi Bluetooth library corrects the Mi Smart Safe Box’s door readings. The safe could alternate between closed and open while remaining shut because its periodic status used the opposite mapping from its door event.
Vladimir Bely checked the advertisements from a safe running firmware 2.3.1_1160. The library also marks it locked when the door closes, since the safe sends no separate lock event, and keeps fingerprint-match events from overwriting the correct key identifier. It retains the reported battery percentage and removes the voltage estimate. This is Bely’s first contribution to the library.