Hi again everyone!
I’ve been fiddling with this idea for the past weeks and cannot seem to let it go . I want a piston that sends a notification only when a switch is turned off after having been on for a certain amount of time.
I tried this
IF Switch changes to OFF
IF Switch was on for at least 2 hours
Send notification
I also tried
IF Switch was ON for 30 seconds
followed within 1 minute by
Switch changes to OFF
Send notification
But it doesn’t work. I believe it is because in the moment the switch is turned off, it’s not considered that it has been on anymore. Not sure about this though, but my tests didn’t work. I did many tests with 15 seconds, 15 minutes and 2 hours and different setups.
I tried to understand the “followed by” logical operator and the “while loop” with no success. I read examples but in those examples there are many switches involved and the one that triggers the action doesn’t change.
I was already successful with a piston that sends the notification when the device has been on for a certain amount of time (IF switch changes to on, wait 15 minutes, IF switch is still on, send notification) but I’d really like to have one that reacts at the end of the process “looking back” at the time it was on.
I know I could use variables for this but I see there are so many tools here that I hope there is a simpler way of doing this, so I’m open to suggestions and new ideas
Thanks!
Rodrigo