Hi, I’ve just struggled doing this, finally works. I have my rf bridge plugged into sonoff s20, that is linked to ifttt which turns it on at sunset and off at dawn, making it only able to take commands from the pir between those times. Then my PIR/motion sensor is set to turn my outside lights on, which are on a sonoff wall switch. Then I have a countdown set on the rf hub, button 1, to press, which I have set to turn the outside lights off.
Separate to this is have used stringify and iffttt to turn my outside lights on for five minutes based on it being nighttime and my location from my iPhone to a 1000ft, then it’s set to turn the off from a stringify timer, it’s woks a dream.