Restarting can be made if you use virtual switch standard and Setting Force state change on (default).
I tested it using motion sensor.
Delay ( 5 minutes ) is restarted when motion is detected again. Virtual switch is turned off after 5 minutes from last motion detected.


