Lights not turning off after timer


#1

1) Give a description of the problem
Garage Light not turning off after the 5 minute timer

2) What is the expected behavior?
When any of the 3 contact sensors are opened turn on light and wait 5 minutes and turn off

3) What is happening/not happening?
Garage Light not turning off after the 5 minute timer

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

The reason is that as you are using ‘changes to’, after a short period the ‘changes to’ will become false and the tasks will cancel.
To stop this, click on the ‘with’ and then the settings cog at the bottom.
Now change Task Cancellation Policy (TCP) to never. A RED ‘N’ will appear in the piston next to the with.
Now when the ‘changes to’ becomes false, the tasks will not cancel and the timer will mature.

EDIT. Just for reference I see you are using variables for sunset and sunrise. There is an option available to select these from preset values and you do not need to use variables.
In your TIME parameter click on the value box and instead of selecting variable, select presets. The way you have it is the $sunrise variable will populate from today and not tomorrow. Not a big deal but something to consider.


#3

@bobbles Thanks so much. I’ve been screwing that for a couple days. Much appreciation.