Help getting restore after wait working

Can someone tell me why the wait for power to drop then restore the lights doesn't work?

I’m curious - have you tried that as Wait for event with a timeout, in place of waiting for a condition.

I tested it with a wait when I used a virtual switch to test it. That worked. But now I have the power monitoring plug and out that in it's place and it doesn't restore.

With your power monitoring plug, can you wait for an event, in place of waiting for a condition.

I will try.

1 Like

How steady is your power reporting? If you are getting multiple events, or it is jumping around, you may have weird results.

I do power a different way. I write a rule, have it evaluate for power above X or below Y. That sets a private boolean to True or False.

The Private boolean is then used in the secondary rule (like your example). If PB is true then "A" if PB is False then "B"

This is the rule, that leads to the water heater doing something if washer is above 10W and changing back of below 0.5W (effectively zero watts). The other half (Water Heater High Demand) is in a different rule (not shown)

c0ab56ea64886c7283b7686cf2f3c8a4f3e5113e_2_690x244 .

1 Like

I'll have to study this a bit. It's a little over my head. But maybe it will solve it

The idea is that this one I show does the hard work. It takes many events and outputs a binary state (T or F).

That makes it so the other (PS4) rule doesn't trigger constantly, every time the power changes. The way yours is, if it hits 70W it runs, then 73W it will trigger again, and over and over. Same on the down limit, it will trigger every time it changes below 50W.

So your existing rule would stay exactly as-is, except trigger would be PB true (power above 70) and the wait would be PB False (below 50).

So a wait for event as suggested wouldn't solve it then it would seem. So I'll have to rip your code off and make it work with this

Steal away!

There is only one other trick. At some point you have to allow this new Private Boolean rule to be used in the PS4 rule. I can't remember exactly where it crops up, but here is what it says. Same for False, you have to declare the rule to use it in.

ill start reading up on how to write the rule. i dont see how to do all the if and else if and what not statements. so ill read the hubitat blog on that first to make sure i dont screw it up.

"Select Action Type to Add" > Conditional Actions in the Actions to Run section.

So far i created the rule for setting the boolean true or false. i can't figure out how to use this rule in my ps4 rule to take action.

Conditional Actions
IF power level is....
Done. (just like what you have so far)

Select Action Type to Add
Set Private Boolean/Run/Cancel/Pause
Set Private Boolean True

Ah got ya. so now then this should work. if the rule to set the boolean sets it to true. then the rule for the PS4 will now run. and if it sets to false then it restores. is there any got yas in what i have here?

1 Like


Try it and see how it works.

Does seem to be. but now i think its trying to constantly restore lights because its thinking that boolean is going false. so its constantly restoring.

edit: the power of the PS4 keeps toggling between 1 and 2 watts while in standby. maybe the boolean needs to be changed somehow so that any changes below 10 watts does nothing.

Yep, that is one thing you will have to do, play with the levels just a bit to get it to really report on VS off. Did you do 70W on and 50W off or something different?

i did anything over 70 goes to TRUE anything below 50 goes to False. but now i need to figure out how to say

if its below 50 and not lower than 10

does this look like it will keep it from constantly triggering. and only trigger while its going into rest mode from the power dropping.