Am I using Private Boolean correctly? [SOLVED]

I'm not so great at creating rule logic. Can someone help me confirm that this rule will do what I want it to?

My goal was to have the rule trigger when a smart outlet's power draw is >10W, change an input on a HEOS device I have integrated with HE, and then with private boolean disable the rule until the outlet power draw drops below 2W, re-enabling the rule.

Did I get it right or mess something up? Thanks!

Is it not working, or are you just wanting to make sure you have done it correctly?

It looks like you may have read some old documentation on Private Boolean. Back in the day (before you could do conditionals and whatnot), it was a way you could restrict a rule from running. Nowadays, it will only do exactly what you tell it to. As-written in this rule, that's nothing (its value isn't checked or otherwise used anywhere), but I think it's just a few clicks away from what you were going for.

For your desired outcome, I'd suggest keeping your trigger but modifying the actions, something like:

Select Actions to Run:

IF (Private Boolean is True) THEN
  playInput(optical_in_1) on HEOS
  Set Private Boolean False
Wait for events: power < 2.0
Set Private Boolean True

Thanks a lot, I had a vague recollection that this had changed at some point but wasn’t certain.


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