Report Log item to variable

So this may be simple, but I have tried several commands in RM.

I am interested in the fact that my Lutron devices report in the logs whether the level or switch was set physically (I pushed it) or digitally (Hubitat set it). I want to take that string and capture that into a variable each time a change is reported.

I want to use "variable contains" to determine whether or not that device should listen to the next mode change or not based off whether I was the last one to push the button.

Any suggestions appreciated.

Thank you!
Screen Shot 2021-10-17 at 6.13.06 PM

Look at the device events on the device page. Whatever is there for Description Text is put into a special 'variable' called %text%, for whatever triggered the rule. So you could have a rule that is triggered by one of these devices changing, capture that text value, put that in a String variable, possibly parse it as needed, and go from there. For example, you could use the 'Contains' condition on the variable, and use that to decide what to do.

For Lutron devices, the Description Text does contain [Physical] and [Digital], so you could get this to work. It's also possible to trigger off either type of event also, so another way to do it.

Thank you, this works! I am searching around for places to find list of variable syntax. I did search documentation as well as some thread, but I missed %text%.

Is there a list somewhere of available syntax for variables?

In most places in Rule 5.1, there are toggles to use a variable, and when selected a pull down selector. Some places expecting a string input you can use %variable-name%.

1 Like

Is this driver dependent? I was playing around with the Iris V1 Keypad driver from here and it doesn't seem to fill the %text% variable. So I assume it must be?

1 Like

Look at the events log found on the device page. Thatā€™s where you see what is sent by that deviceā€™s driver.

Ok it is the driver, as the description text is empty for almost every event for that device driver. Thanks

Thatā€™s straightforward to fix.