RM 5.0: Wait for Condition/Event Variable?


Recreating a Rule from Legacy in RM5. I have the following statement in my old rule:

This does not seem possible in RM5. The list of capabilities doesn't include Variable any more. In this I'm trying to reference a Hub Variable so I can create a Connector, but this doesn't seem logical, especially for local variables.

Is this part of performance increate using Hub Variables?


2nd issue, just tried to "Set Variable" for a Hub Variable and they don't show up.

A Wait for Conditions doesn't allow a Variable because Hub Variables do not create events when they change values, so the Wait would not end. If you want that functionality, you have to use a Connector for the variable, and test the Connector in the Wait for Conditions.

A Connector is a device (virtual), so it does generate events when it changes values. It's linked directly to the variable, so when the variable changes value, so does the connector. In Rule Machine Legacy, it effectively generated 'events' for Global Variables, so Global Variables were allowed directly in this context.

Thanks for the confirmation on Hub Variables, but what about specifying local variables?

Well, you can't very well have a local variable in a Wait for Conditions, since no other rule can set one and this rule is waiting so it can't set it either. You could use a connector of a local variable, as its just a device and anything can set the device.


Download the Hubitat app