1) Give a description of the problem
I’ve written a piston to automatically set Smartthings to Armed (Stay) mode once we’ve gone up to bed for the night. It is based on all the downstairs lights being off after sunset. Although it works, if I turn the last downstairs light off but then turn another on the 5 minute offset doesn’t get reset. That means if I spend more than 5 minutes doing something the Armed (Stay) mode will be set regardless.
2) What is the expected behaviour?
If I turn the last downstairs light off but then turn another one on, I want the 5 minute offset to reset.
3) What is happening/not happening?
As mentioned above the piston pretty much works except for the timer reset issue I described.
4) Post a Green Snapshot of the piston
Would appreciate any help to tweak this piston!