Please add a list of available Hub Global variables to RM Doco

Can we please get a list of Hub Global variables that are available to RM added to the RM doco?

eg most of us know about:

%time% %date% %device%

But If we want to use "Hub Name" in a notification etc, there doesn't appear to be anywhere we can look up what the variable name is. If we could please have a section in the RM Doco on available global variables, it would be appreciated:

@bravenel @bobbyD

1 Like

These are already documented; see the note at the end of the "Local Variables" section: Rule 5.1 | Hubitat Documentation

I am not aware of such a thing existing, hence no documentation. :slight_smile:

1 Like

Ok, I was just hoping there were more than the 6 listed.

No, but I think I know what you might be thinking of if you remember seeing this behavior somewhere. There are some circumstances where %device% might end up being the hub/location name, specifically for certain location events rather than device events. As far as I know, this behavior is just incidental at the moment and not guaranteed, with only device event triggers having defined (and thus documented) behavior.

But still no way to simply retrieve it on demand, at least not from a rule via entirely built-in means.

Yep, and for Hub events it works, but for events from say the Hub Info Driver by @thebearmay , %device% gives you the driver name.

1 Like

Yes, it should give you the name of the device for device events, so whatever you called the device you created with that driver. (And that driver does expose a locationName attribute with the name you're looking for -- you could set that to a local variable and then use it wherever, for example. No need for any specific thing to be a trigger in that case.)


Hmm, I'll give that a shot.

Ok, dumb question, how do I do that?

EDIT: NVM, I worked it out.