Have verified that the Notify command can insert the value of any type of Global Variable in the message. However, Local Variable values are interpreted as null in the message.
I'd rather not create a set of Global Variables just to be able to show the values. Already have an extensive list of GV's.
This should work, and I am not able to replicate the problem (or feature request) you describe. The following rule works fine for me when the action is run:
This includes the actual text sent to the notification device:
If you are seeing something else, I suggest providing a screenshot (or text) of your complete rule plus any logs that demonstrate the problem.
You absolutely CAN use local variables. The only difference is that local variables don't populate until the rule is TRIGGERED by an actual trigger event. Simply running the rule actions will leave most local variables unpopulated, or will only show the last triggered event values. You may get "null" messages or incomplete results if testing by running the rule manually.
The problem was with number and decimal variables. I had to use Global Variables, Local Variables would always show null even with the proper value.
I am still not able to replicate this problem with a number variable. Here is my rule and logs showing the correct behavior:
If this is not what you are seeing, then:
I am attempting an hourly notification of a device temperature using local variables, and during testing of the rule or by the hourly trigger the response is "null". I will try my hand at attaching screen shots, and any help would be appreciated.
Notification rule:
Rule where local variables is created:
Why don't you just use a hub variable instead of a local variable?
The main difference between hub and private variables is that the former can be created in one place and used in another, which is that you're trying to do.
I have never used hub variables before, I will poke around and see if I can set it up. Any pointers or a link to an example would be helpful if you have the opportunity. Thanks
In your example, the only difference is where you create the variable, which is Settings -> Hub Variables.
You can click on a variable name (and scroll to the bottom if you have a lot of them) to see where it is in use, and you can click on the variable value to manually change it from the hub variables list.
Use it just like you were using the local variable with % % around it.
https://docs2.hubitat.com/en/user-interface/settings/hub-variables