Xiaomi sensors stop working after hassio reinstall

So I had everything set up nicely, hassio running on Pi 3 B+, Xiaomi Aqara gateway set up, some Xiaomi mini switches and motion sensors and everything was working ok. Then I ran into a problem that had me re-install HA (i.e. flash sd card again) after which I copied over my yaml files from a backup.

Most things are working ok, Aqara gateway is responding, I can toggle its light, play sounds etc. Motion sensors are also reporting movement ok. But mini switches are completely off and no event is reported to HA. I can see events in Mi Home app, but nothing in HA. I tried removing, resetting but no luck. Adding a brand new Xiaomi sensor works fine as well.

So it seems that for some reason mini switch events are no longer being sent to HA, but other things are working. I can’t figure out why this would be or what else to try to fix it. Can anyone help, please?

Could it be the breaking change for aqara in 0.83?

#17354) (binary_sensor.xiaomi_aqara docs) (breaking change)

You need to change the prefix in all automations to xiaomi_aqara.click instead of click.

Fantastic, thanks a million!

I am in a similar situation but it’s a bit weirder. I setup my Xiaomi kit yesterday (Christmas present!) and it was working fine, but today it’s not…
Motion events are being picked up ok.
Movement events aren’t working.
Click events aren’t working.

I am using xiaomi_aqara.click and xiaomi_aqara.movement events in my automations.

I went looking into the dev area and in the events section. I could only see the xiaomi_aqara.motion event bus being monitored, which fits.

Then I restarted. This took a long time - like 3 minutes, vs 30 seconds usually. Btw I am running a Pi 3+ B 32 bit.
After it came up, I can now see the xiaomi_aqara.movement event bus but not the .click event bus.

It seems like a strange transient issue but I wonder if there is any way to pin it down/troubleshoot to behave reliably?

EDIT running 0.84.6
EDIT 2 : Ugh, the xiaomi_aqara.movement event bus has disappeared. I have restarted and it’s still not back. :frowning:
EDIT 3 : after a full rebuild this is working again. A bit annoying but fingers crossed it behaves from now on.