I’ve been using this sensor at the link below for some time, the settings still take a little getting used to, otherwise it works well as a motion sensor at night
Turn light on and off.
https://mystrom.ch/de/wifi-motion-sensor/
Installationen, Netzwerk, Internet, Computertechnik, OS Windows, Apple und Linux.