Xiaomi Motion Sensor events not picked up by HA (works via Mi Home App)

Last night everything worked perfectly (sensor events are picked up by HA, and I could use it to activate triggers).

This morning, the mi sensor events stopped flowing to HA. I looked at the HA logs, it doesn’t pick up the events it used to pick up yesterday. For example, the following was from yesterday when motion was detected and picked up by HA:

2018-08-20 20:23:21 INFO (MainThread) [homeassistant.core] Bus:Handling <Event motion[L]: entity_id=binary_sensor.motion_sensor_158d0001d90a65>

2018-08-20 20:23:21 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state binary_sensor.motion_sensor_158d0001d90a65=off; friendly_name=Motion Sensor_158d0001d90a65, device_class=motion, No motion since=0 @

I tried the following this afternoon:

  1. Unpair the sensor and pair with the gateway again
  2. Unpair gateway with wifi, and paired again
  3. Updated the wifi key on gateway (via app), and updated its config in HA config, restarted HA

I’m seeing the sensor appearing in HA, but HA is not picking up the sensor events. I checked the Mi Home app … and it does show the events picked up by the gateway, showing in the app, just not in HA.

Where else should I be looking?

I am having the same problem. Could someone already solve this? Door sensors states are changing perfectly in the mi home app but are not picked up by HA. There are somehow some states shown in the HA history, so it seems to pick up the states with a huge interval and makes the door sensors useless. Do you have any idea how to solve this? Also the motion sensor updates every 2-3 Minutes its state, I read about this issue but also no solution for that one.

Any ideas on a solution?