Turn off lights if no motion is detected, but warn before doing so


#1

If after a certain period of no motion detected flash the lights as a warning, then turn off the lights. However if motion is detected during the warning flashes to keep the lights on and wait for no motion again. The current piston does the first part ok, but stays off if there is motion during the warning phase.


#2

You can probably modify this to add the flash task