The trick is to detect a power outage and when the power is restored:
When I unplug my “power outage detector” (device that detects the power source) and plug it back in, all of my lights turn off after 15 minutes.