Not sure which module you are using, but adding a capacitor like this solved the problem for me
https://redfox314.tweakblogs.net/blog/16895/esp8266-and-hc-sr501-false-positives
Not sure which module you are using, but adding a capacitor like this solved the problem for me
https://redfox314.tweakblogs.net/blog/16895/esp8266-and-hc-sr501-false-positives