No it didn’t fire at all. When I was looking at it last night it the logs showed that it was cancelling the piston because the condition wasn’t met. It never did anything.
Good Night Routine Piston firing twice!?
The variable never reset to false at 7AM due to the restriction right up top. I just used the variable as a condition in this revision so the every day timer will function. I didn’t touch any of your logic other than inserting the variable conditions.
OK, I see what you have changed but I think that the second IF statement isn’t going to be right because the as it flows through the piston it will pass the time restriction and motion restriction and the variable restriction but if the Mode is “Sleepin” then the lights won’t turn off but it will continue down the piston and set the thermostat and then the set the variable to True. Then it will cancel at the next IF because wasTriggered will be True. This is so weird that this is so difficult because it seems like it should be a fairly easy piston.
LOL, I didn’t add anything else other than the variables as I thought you had it working like you wanted.
I re-thought this whole piston and this is what I came up with. I took the whole second IF out and put the Turn Lights Off (only when Home, Tom’s Bedtime, Sleepin) then set the location Mode to Night (only if Home, Tom’s Bedtime). That way if the Mode is already Sleepin it won’t change.