Trigger notification when power stays between two values for period of time

Hi - I want to create a notification when the door to our clothes dryer is left open, leaving the bulb on.
This results in a power level around 10W, so I was thinking I'd create something that checks if the power is between 5w and 15W (for example) and stays there for more than let's say 20 min.

I've considered Rule Machine, Device Check Plus and a few others but wondered if there was an obvious simplest way to get at this.

Rule Machine doesn't seem to have a trigger using a value in a range.


I though you might be able to do this with a combination of a trigger and a required expression or a simple conditional but I don't think that would work.

What if you tried this... have the trigger be power level >5w and then a WHILE statement that checks for the power level to be between 5 and 15 that times out after 20 min? If the WHILE times out then you know it has been between 5 and 15 the whole time.

You can check to see if your WHILE times out if, when the loop exits, %device% has a value of "timeout"

Make 2 triggers one greater than 5 and the other less than 15 then in your actions just lock it down with and IF statement and do it all there in rule machine. At least that's how I'd tackle that.

Triggers are OR so I would you RE and changed. Here's a test rule that worked for me.

What happens when the rule runs more than once, which it will since the trigger is "changed"? If the power consumption goes from 7 to 8 to 7 to 8 to 6 but stays within the range won't it reset the timer because the rule runs over and over?

Yes, it will. I assumed something like a dryer light would be a constant draw or at least to the resolution that you have the power reporting. If not, a PB could be added to keep it from retriggering.

1 Like

Yeah you're probably right... maybe I'm over-thinking the solution.

I actually thought about it when I made my test rule and almost put it in but decided it was good enough to show that this approach would work.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.