Motion Sensor automation - sometimes light will not switch ON

I created an easy Motion-sensor automation with HA so no yaml coding needed (see attatchment).
My motion sensor is Zigbee Sonoff motion sensor, my light switch is a wifi soft/hard switch.

Sometimes a day the light will not switch ON when I enter my garage. But I see a red blink on the motion sensor so motion is detected. In HA I see both devices available.

Any suggestions?

Hi,

Did you check that the motion detection is registered in HA too ?
Although as you say you saw the motion sensor blink, the actual state signal may not have been transmitted to HA
Please check the device/entity history for the zigbee motion detector in HA

Cheers

What I see in the history of the motion detector is:
Motion Sensor 1 ias_zone motion detectecd - and the light switches ON - and 1
minute later Motion Sensor 1 ias_zone nothing detected - and the light swithes OFF.

However, I see in the logging history also 16 hours earlier an event Motion Sensor 1 Zha Event was fired - followed by - Motion Sensor 1 ias_zone no longer available

Batttery sensor: 60%, so the battery is not the problem

I replaced the Sonoff motion sensor by a TuYa ZP01. This did the trick for me.