I suppose I should have asked for your use-case instead...
From what I'm reading, this is what you want: when Motion Sensor X goes off, wait Y minutes (configured to change throughout the day) then turn off a light.
If that's correct, how's this for a solution:
- Set your MSD to go off immediately when the module itself goes off.
- Create a timer for your Motion Sensor Device (MSD). Set it's run time to whatever time you want it to delay if it ran immediately.
- Create a trigger that sees the MS going OFF and restarts the timer (use restart action, not start action).
- Create a trigger that sees the MS going ON and the action cancels the timer
- Create a trigger using the Timers and Pesters Timer Expired Event, and make it's action to turn off the light.
- Create two schedules, one for each time during the day where the timeout period changes. The action will be to Set Timer Start Value to the new timeout period (i.e. 10 minutes or whatever)
So, any time the MS goes off, the trigger starts the timer running for however many minutes (or seconds or whatever) it's configured to run. When it expires, the light goes off. If, in the interim, if the motion sensor goes on/off, that's handled by the ON trigger and the fact that you use the timer restart action (which will restart it regardless of what state its in). The schedules set the timer's runtime so that during the day it's shorter, in the evening it's longer.
There are a variety of other ways to implement the solution that don't require polling, most involving scripts. Some will have fewer Indigo moving parts but will be more complex because the logic represented by each would have to be replicated in a script, so I chose to use the non-scripting solution.