Can't get this to turn off switch after certain period

I’m new to this but I feel like I got the hang of this… or so I thought. I wanted to get a notification every time my doorbell rang. While I know there are many solutions to this, I chose to use the vibration sensor on a SmartThings multi purpose sensor placed inside the doorbell wall unit in my house. I tested this thoroughly and it simply works every time and there have never been any false triggers. I then created a piston that sends the push notification “Doorbell rang!” when vibration is active and it works absolutely flawlessly.

The problem began as soon as I tried to get fancy, I guess.

I have a tablet mounted to a wall that I am using for an automation panel with ActionTiles. I simply want a tile that will indicate the doorbell recently rang but didn’t want to use the tile for the sensor since it’s “momentary” nor a another device so I created a simulated switch and then a tile for it in AT that would show it as on or off. The switch “works” in that I can turn it on and off easily in the ST dashboard and its state display correctly in AT.

I edited the piston to trigger to then turn also on this switch before sending the push notification, sending it, waiting 5 minutes, and then turning the switch off. Now, it will turn on the switch, looks like I want it to in AT, sends me the push notification, and but the switch won’t turn off.

I went back and changed the wait to 10 seconds to test and then to 30 seconds because I thought perhaps the delay wasn’t long enough. That didn’t work. I then though that perhaps this had something to do with the fact that it was a simulated switch so I added a task to send another push notification after waiting 30 seconds. That didn’t work either.

I’ve attached the piston in it’s current form. I’d appreciate any guidance.

THANKS!

image

Never mind, I figured it out a way to make this work. I just created two conditions, one for when the acceleration changes to active and another for when it becomes inactive and it works like a charm.

image