I’m watching a thread on Facebook where someone is looking for support on a fairly straight forward piston. I don’t want to post someone else’s piston, so I’ll just describe it which should be enough.
If momentary button tile switch changes to on:
with device:
Turn off.
wait 5 seconds
command()
The user is explaining that it only works “half the time”.
I can see in the logs they’ve posted, quite clearly, that "Comparison (enum) on changes_to (string) on = true… and then the remaining tasks are being cancelled.
Now, I understand enough of WebCore to understand how the wait command is handled in regards to cancellation in that a change in the parent conditions state will cancel pending actions by default… but why is it only happening “half of the time”? I’m guessing it has to do with it being a momentary button tile, and that the changes to on then immediately after changes to off may be what’s causing it? If that’s the case, why is it only happening sometimes? Can someone explain what’s happening here?
Log story short, I think the “fix” here is to change the cancelation policy to never cancel… but I’d like to better understand the mechanics here involve for my own benefit.
Thank you.