Xiaomi switch automation slow to trigger

I am running Home Assistant on a Raspberry Pi on Docker. I have configured the Xiaomi gateway and a couple of two button wall switches. I have an automation rule to turn some lights on when the switches are pressed.

I’m getting inconsistent response times for the switches. Sometimes, the light turns on instantly, but sometimes there is a 5 to 10 seconds delay for the light to turn on.

It’s not a problem with the switch because the Xiaomi app gets switch press instantly. Similarly, the lights always turn on instantly when turned on by another method. So that narrows it down to a delay to trigger the automation.

Any idea what is the problem and how to resolve it?

1 Like

I have the same problem with Xiaomi wireless wall switch and the round wireless switch. If I set it up to turn on lights within the Xiaomi app, it’s immediately. When done via HA, it is slow.

Did you found a sollution for that?

I know its an old post but im having similar issues and wondering if you ever got to the bottom of it.

As you say sometimes instant and sometimes a delay i’ve also had it completely ignore the press as well.

Possibly interference? I have both and they seem to work fine, I use two gateways as well.

But as the OP said it works fine using the Mi Home app works fine so that should rule out any issues on the Zigbee network.
The issue for me appears to be any automation involving Xiaomi switch. This includes body sensor, window/door sensor, remote switch (square and round) and wall switches with and without neutral. Some controlling Sonoff’s some controlling other Xiaomi devices.

Running hassio (latest version) on Pi3 hard wired directly to my router, which is google WiFi network and all tests show the Xiaomi gateway is connected fine.

Ive spent time fine tuning like getting the database down to 100Mb, switching over to google WiFi from my ISP supplied router etc and just can’t seem to get to the bottom of the issue.

Hi I am facing same problem. Anyone have solved this problem after so long time ?

1 Like

I have just tested the automation between the wireless switch and a light switch in HA and via the Mi Home app. Exactly the same issue - randomly between 1 and 10 secs to activate. I have an old Mi gateway they are running through, so I will test next, I think with the multi-bluetooth/zigbee gateway and see if that makes a difference to either.

I have the same problem for my xiaomi play pro stereo and some of the sensor