1) Give a description of the problem
I have a piston to set my thermostat to “away” when everyone leaves and back to “home” when someone arrives. I’m currently triggering it when the SmartThings “Goodbye!” and “I’m Back!” routines are executed, but at least once per week when I arrive home, these routines will fire multiple times in very rapid succession in a seemingly random order.
2) What is the expected behavior?
When I arrive home, the piston processes one of the “I’m Back!” events, and ignores all the other “I’m Back!” and “Goodbye!” events.
3) What is happening/not happening?
I first tried putting a 30 second wait as the first step in this piston, so that each new event would cancel the previous one, due to the Task Cancellation Policy. But since the events occur in a random order, the last event could be the “Goodbye!” event, and my thermostat doesn’t change to “home”.
So then I tried putting a 30 second lockout at the start of the piston, so that only the first event is processed and all subsequent ones are ignored. But this just reversed the problem I had before. If the “Goodbye!” event happens to be the first one, then my thermostat doesn’t change to “home”.
Has anyone else experienced a situation like this and have a better strategy for how to handle it?
The real piston is more complicated than this, but here’s the important parts of what I currently have (with the lockout):