Home Assistant delay in entity state checking causing delayed automation

Hi all :slight_smile:
I have installed Home Assistant on Raspberry Pi 4 ram 4GB yesterday and I have connected my Chinese Mi gateway v2 (Mijia, not Aqara) and I have connected my Sonoff basic with a light bulb for trying out automation. I did not attach any Conbee 2 or CC2531 ZigBee dongle. The Mi wireless button is set to change color on Single Press. Since the gateway is connected to my Home Assistant, the changed state after a single press from the wireless switch or button should have been seen instantly in Home assistant. But it seems it delays about 15 to 20 seconds.
I have set as such that, when the light of Gateway change state, the Sonoff switch will toggle on/off. The automation is taking 15 to 20 seconds to realize that the state has changed and then the action is triggered. why this is happening and how can I use local push instead of state checking.
Can anyone help, please?