Help me convert a Rule 3.0 rule to Rule 4.0

I am using power-monitoring plugs to monitor my washer and dryer using Rule 3.0 rules I had copied from @ogiewon. An example can be found here

I am trying to convert these to Rule 4.0 and add more conditionals before an announcement is made. By dumb luck the rule I made (pasted below) works, but I'm getting duplicate notifications. So obviously it is wrong.

I could really use some help in cleaning it up and making it work.

Thanks much!

I am far from an expert, but I did my similar rule quite a bit different. I actually used two rules, one set the Private Boolean, and that PB result is used in a second rule. I am not sure if that is better, but it was easier.

The other thing I did different was the PB rule was:

  • IF power level is X set PB to True,
  • ELSE IF set PB to False.

I didn't do that first END IF you have, nor did I say "wait for condition".

See this link for screen caps of what I did:

1 Like

Does the power level ever change when the private boolean (henceforth, PB) is false? If so, what will happen is a delay, then the notification--every time the power level changes and is below 10, not just the first. If you set the "Cancel?" flag on that delay and then add "Cancel Delayed Actions" at a logical place in your rule--perhaps when you set the PB true, then that may take care of that problem. That being said, I'm not sure the PB is doing much for you here: you could just put the "Wait" for the level <= 1.0 inside the IF (Power level of Samsung - dryer blower is >= 10.0 block, along with whatever you want to happen after both of those conditions are met, which is seemingly just the rest of your actions. Waits are effectively cancelled/reset every time the trigger fires (so you should be good there); delays are not (they will pile up; I'd still use an ELSE with a "Cancel delayed actions" so it gets cancelled if the level goes above 10 again).

That being said, the other post may give you some ideas, and it's probably better thought out that anything I said above since they've actually tried it to see how it works in real life. :slight_smile: (Multiple rules with different triggers is often better than one with a lot of triggers--not a problem you have here--but something to consider since you can have multiple instances of a rule running, and multiple triggers make that complexity hard to see sometimes.)

1 Like

Here is what I am trying in RM 4

1 Like

@ogiewon @bertabcd1234

Thank you - this is exactly what I was looking for. What I didn't realize was that "Canceled delayed actions" could appear before "Delay" in a rule.

1 Like

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