Hi, I notice that when I edit a Rule Machine rule it is populated with variable (strings) that appear to come from the last time the event was triggered. Why does Rule Machine show these rules, it is confusing. Is there a way to avoid this from happening?
In my example screenshot you can that the code is ther to show %device% and %value% followed by a string of text populated with variables that were pulled from the last time the event was triggered.
Thanks for any insight!
Turn off this option for that rule:
5 Likes
Adding to the above, Rule Machine shows the current values of the variables by default in most places in the UI. In the case of the built-in variables you're using like %device%, they represent the name (or value, time, etc. if you use the others) of the last trigger event device. And like any variable, they will stay at those values until changed by something else (there's no magic that knows you're done with whatever you happen to be doing with the values and "resets" anything).
The current value of variables and expressions can be helpful to know when looking at what a rule would do if executed currently. It can also be helpful to have in Logs to know what happened if something doesn't work as expected. That's one reason you might want to keep this option enabled -- but if the display of current values is in the way when editing and you don't find the guidance they provide useful, you can certainly turn them off as suggested above!
7 Likes
Thank you both for the responses - greatly appreciated 