Create Wait for Event with where both conditions are required (and vs. or)

I need a way to wait for an expression or event that includes:

  1. Set of contacts all closed
  2. Power level for one power meter = 0 for at least x seconds

Needs to be an "and" wait, both conditions above have to be true, and the power meter condition needs an "and stays" setting.

Using Wait for Expression I can get an "and" to require both conditions, but expressions don't include the option to set an "and stays" option.

"Wait for Event" with two events allows me to set the "and stays" setting, but it defaults to "or" and I can't find a way to change that to an "and."

I must be missing something...

EDIT: Just realized it may look like I was trying to use both lines below in one rule - I was just showing examples of both the wait for event and wait for expression options. Sorry if that was confusing.

Could you not do the "wait for stays that way" then the next action be an "if everything is closed"?

1 Like

Thanks. I was just thinking that there was a way to do it in a Wait that I was missing. Seemed odd that I couldn't make iit work that way.

You can do this with Duration for the Wait for Expression. That's the equivalent of 'Stays'.

2 Likes

Thanks...now that you say that it seems so obvious it hurts...

I did just have a weird experience...I created a new rule just to try/test Duration, and got this when I added the second expression (power meter).

Note the formatting expression above the first line of the rule, and the missing info in the second part of the expression in the first line:

Stayed the same when I hit Done:

The second expression looks normal:

That's very strange. Some sort of html break in the browser evidently. I can't reproduce it.

You should delete that action, and try to create it again from the existing Conditions.

Odd - I just repeated it and same thing happened again.

I. Start new rule
2. Single contact open as the trigger
3. Add one action - Wait for Expression using contact (same as trigger) to close, and then add second (using "And") expression to the Wait using power meter, and set a duration just for the power meter expression.

Hit done and above shows up.

Your first Condition is not a simple contact open condition, but something else. Please open that condition and post that screenshot.

Or, is that 'Aqara Contact 1 on AbraHubitat2' a device name? Does it have some special character in the name?

What browser? Please see if this opens on some other browser.

It's the contact sensor device name...I keep it around next to me on a table to test with.

Chrome, current version, on Win 11.

Off to test another browser.

See if every rule you create has this same problem rendering. Or open any Rule 5.1 to see...

Gets weirder...used Edge. I had created the same rule two times.

2nd instance of the rule I created opened up looking normal in Edge:


Went back to Chrome and the 2nd instance of the rule now looks OK:

However, first instance still looks wrong in Edge and Chrome:

Edge:

Chrome:

Ah, the cosmic particle hit your computer while rendering problem.... :crazy_face:

But. you didn't show the Actions page, where the table is rendered. That's where the problem is, not the main page.

1 Like

FIrst iteration of the rule in Edge:

FIrst in Chrome:

Second in Edge:

Second in Chrome:

I have no clue how I could do the same thing twice in a row and have the same result, but then have the results diverge when I open the rule in another browser. Other than the cosmic particle. That works.

Just recreated this in Edge...

And same in Firefox:

So not a Chrome-specific issue. Maybe still a me-specific issue. :man_shrugging:

A bit is getting dropped somewhere. What's very odd is that even with the formatting stuff spit out before the table, the table still renders correctly. That really doesn't make sense. You might examine that with F12 inspector for Chrome.

1 Like

So you are still unable to replicate this?

I don't have experience/background in the info provided via F12...but it did show this error info:

And this issue:

Similar on the other instance of the rule I created, not sure if that is meaningful/useful or is a non-related issue:


My suggestion is that you use Diagnostic Tool to roll back to a prior build, and the update again. Perhaps your download was corrupted.

No one else has reported this all through beta.

You never answered my question about do all 5.1 rules do this? Did you open any other to see?

Missed that question - yes, I opened a few other rules and all of them have that same issue w/the formatting content above the table. They do display the table and work normally, I've had no problems w/my rules running. If I "Done" out of the table page and re-enter it immediately, the formatting text is gone. If I leave the rule entire (Done until out of it) and re-enter the table page the formatting text is back.

I just tried on another Windows laptop and the issue isn't appearing on that laptop. So that's odd...I'm going to reboot my laptop and see if that has any effect. If things continue I can do a fall-back and update again, but if it's a general issue w/the code on my hub it shouldn't matter which laptop is connecting to it.

Download the Hubitat app