Piston to turn outlet on and off has stopped working


I had a piston that turns on a outdoor outlet shortly after sunset and off at 11:15 at night. It had worked for a couple of months, but now the outlet does not turn on. I can still turn it on and off manually from the smartthings app. What can I do to troubleshoot or fix this?
Here is my piston and a copy of the log that I started yesterday.


To me the if seems problematic. Why next sunset? I am not really sure how that system variable works. I assume after sunset the current day it is the next days sunset time? That is what it is equal to on my system right now. So anytime between sunset and 11:15 turn on the switch and anytime after 11:15 start turning the switch off. That is quite an open ended trigger event.

I would keep it simple with something like this.


Thank you for the suggestion. I am learning to use webcore so I modified someone else’s piston that I found that appeared to do what I needed. I am not sure why they used the if statement. I will try this out tonight.


@Terminal your pistion got things working again. Thank you for your help.