I use the SmartSwitch plug-in for all my motion and door sensors to activate my lights when motion is detected. You can also setup scenes to change its settings, for example for a set of dimmable bulbs and after 9pm I have a scene run that lowers the brightness of the bulbs when motion is detected. I’m sure you could do something similar for your scenario.
I think you could accomplish this with another scene to change the “SetOnLevel” to 0 or maybe Off (not sure which one would work) during the day. I use that variable to change the dimness of my bulbs so I don’t see why you couldn’t just change it to off.
Personally i would do this with a PLEG.
Set the onetime for the motion sensor as 5 mins (300 seconds). This means means the sensor will stay tripped for 5 mins after the last motion.
Set a schedule starting with 30 mins before sunset, finishing 30 mins after sunrise, call it ‘night’ for example
Set a device property for the motion sensor. Add the motion sensor and tripped status, named ‘motion’ for example
The condition would then
(night) AND (motion)
Action would be to turn the light on.
you could then do another condition a bit more general as below. This captures any movement that might overlap the ‘night’ time.
(!motion)