Feedback requested for my first (simple) rule for a garage heater

Events represent state transitions, or state changes. Conditions are boolean expressions evaluated on states.

Correct, but there's a subtlety here that is worth noting and relates to the previous comment. There needs to be an event from one of the contact sensors for the Wait to evaluate that both contacts are closed. Closing one of the contacts triggers an event. However if both of the contacts were closed when rule comes upon the Wait, nothing will happen until one of them is opened and then closed again.

If what you wanted was immediate evaluation of the state of the contacts, you would use Wait for Expression. That would only wait if the expression is false when the action is come upon.

Right, but there is only one Event, for Double. My question was meant to be -The 'Wait for event' doesn't need both Events to be sent to be satisfied?

The way I read the rule, it seemed like it's waiting for both Events to be sent.

This is what I was looking for...

In this case, the rule will wake when either event happens and then evaluate the state of both devices (it being somewhat like "Wait for expression" in this case, aside from the fact that the truth value at the moment the action is reached doesn't matter--as mentioned above, it needs some event to continue).

Events are generated one at a time on the hub; "both" won't/can't truly happen at the same time (not that it matters for this answer, but it's something that some people ask about and is related to the issue at hand).

3 Likes

It's not waiting for both. I suggest you make two virtual contact sensor and a test rule and see for yourself how the various Waits respond.

Sorry, I wasn't challenging you info. I was just trying to figure it out. I plan on experimenting when I get some time in the next week or so.

Thanks again for the help everyone!

3 Likes

True, if there were some sort of delay getting to the Wait. In the OP example there isn't.

I understand. I'm stubborn and someone can tell me what's going to happen but I'll still make a test rule and see for myself. For me, virtual devices and test rules are great way to understand what's actually happening within a rule before I need it to happen.

2 Likes

Great advice.

2 Likes