How can I override a delay?

I have a set of lights in my Kitchen that works on a motion sensor off of my alarm system. After a period of no motion, it turns off one set of lights, and then there is a delay for the other set, so it doesn’t go completely dark if someone is actually there, and it just doesn’t detect motion. The delay is in the Action. It actually works well, however, what I can’t figure out is how to reset it, if it detects motion again.

cKitchTurnOffAutoOnLight
cKitchAutoOnLight AND (tKitchMotion; tKitchNotMotion) AND (tKitchNotMotion; NOW > 10:00)

Action: cKitchTurnOffAutoOnLight
Device Actions:
Immediate
Device Action Arguments
KN Entry Light[179] SetTarget newTargetValue=0
KN Recessed[180]
SetTarget
newTargetValue=0
Delay 30
Device Action Arguments
KN Island Pendants[181] SetTarget newTargetValue=0
Delay 01:00
Device Action Arguments
KN Undercabinet[182] SetTarget newTargetValue=0

Home Lights Logic[288].pdf (155.9 KB)

I’m not 100% sure but I don’t think you can reset the delay in action.
I would create 2 different countdown timers that would reset if there where movment. And the action of each is immediate

I wouldn’t use the delay in this type of automation. Break out each on/off to a discreet condition. You might start a timer/schedule as part of the cKitchTurnOffAutoOnLight immediate actions, then shut off those lights if the timer expires and motion has not been detected in the interim.

Thanks, that’s a good idea. Not even that hard to implement. Just added two conditions (copied and pasted the original), changed the time interval, and created individual actions. That should solve the issue just fine.