Rules using %device%, %value%, etc. Using wait instead of trigger value

Made an interesting discovery today. A “Wait” event will impact the value of %device% and %value%.

I created a couple of test scenarios that react the same:
Scenario 1 will always provide the Wait device’s value:

Scenario 2 will provide the trigger value if the wait condition is already met, but will provide the wait value otherwise:

Log in the case the wait value is initially not met:

Message displayed:

Logs for the situation where the condition is already met:

Message displayed:

The workaround if the trigger device’s values are always expected is to create a variable and store the values before the wait, then display the values of the variables instead of the device.


Yup this broke a couple of my rules when then implemented this change and I had to store them in variables before the wait.

This was a result of a user request btw.

Now I use it in a few rules to know what cause the wait to exit. It’s nice.