I have a vibration sensor on my dryer. Iām trying to create a rule so that after the accelerator has been active for 10 minutes, when it then becomes inactive, Iām notified the dryer cycle is complete.
The requirement of active for 10 minutes is to allow for those times when there is some vibration not connected to end of cycle, such as dryer door being opened to put clothes in, etc.
Iām not sure how to write this rule. Any help is greatly appreciated.
Similar to your case, but I use 45s delay rather the 10 mins you want.
When the PB is true, the dryer is running.
When it changes to inactive when PB is true, it has stopped.
If it changes to inactive during the 45s delay, the delay is canceled and we wait for another event.
As an alternate to what is above here is what I use. I started using two rules so I can trigger and then use waits in the second rule. I don't have to worry about the triggers in the second rule. The system restart and the first part of rule takes care of the situation where I might restart the system while the dryer is running or the dryer gets bumped. The cats sometimes jump on it and trigger the acceleration sensor. This works well.
However, I haven't tested that way to see if there's anything I hadn't considered (can't imagine there would be...). Both of these Rules take advantage of the fact that a trigger cancels any "Wait..." actions (this is different from "Delay" or "delayed," where you must do so yourself--if needed), along with a specific trigger event ("active" instead of "changed") that works together with the "Wait" action(s) to get the desired result.
If the sensor is active because I bumped into the dryer, and then 10 minutes later the sensor is not active, will it send a notification? I only want a notification if the sensor has been continuously active for a period of 10 minutes or more, and then the sensor is inactive.
Ah, I missed that part. You can add a "wait for expression: acceleration active --> duration: 0:10:00" first thing in the actions, then. And if you didn't want to wait for 10 minutes of inactivity (maybe that's what I missed too?), you can adjust that duration or timeout as well, of course.