We use power monitoring plugs on the phone chargers on either side of the bed, if one is unplugged it sets the mode to morning, if both unplugged it sets to home.
We are finding at the minute it is triggering too early when phones are still plugged in, this has been noticed since we got new phones, possibly less power drawer when left connected...
What I think should sort it is that the variable sets after the power level stays equal to 0 for 5 seconds, as we get the off 0 reading now and then while charging. How would I write a rule that triggers when the power has been at 0 for a set amount of time?
This is what we were previously using...
Would this need to be done by a conditional action with delays etc? or is there a cleaner way?
Here is a rule that I use to monitor laundry cycles via power monitoring. It demonstrates a technique to ensure the cycle is really complete, by making sure the power draw is below a certain value for a specific amount of time. What may not be obvious from first glance is that the WAIT statements are automatically cancelled each time the rule is re-triggered.
Credit for this design goes to @bertabcd1234.
1 Like
The two āWait for eventās could also be replaced with a single āWait for conditionā to ensure the power remains at 0 for the whole period. Hereās an example using temperature instead of power:
Good point! My rule for the above is still written in Rule 4.1, which probably predates the 'duration' feature, IIRC. In Rule 5.x, definitely cleaner to use the new 'wait with a duration'. Thanks!
1 Like
I can't find the "wait for conditions" - my rules are rm5
Itās now called Wait for Rule.
2 Likes