Webcore Piston all of a sudden not working

I have had a piston that for over a year has been running fine but all of a sudden is hiccupping. It is a bathroom light triggered by motion with a cool feature that if you manually click the light switch on, it will stay on for up to 30 minutes.

It has a few variables that are used and if the light switch changes to off the variables all change back to false. What I am seeing, however, is that even when the light switch changes to off, the if/then statement that changes the variables evaluates as false. Like I mentioned before, it had been working fine for months and now all of a sudden something is wrong. Screen shot below of the if/then statement and the log that evaluates it false even though it should not .
I welcome any ideas on what could be going wrong!