Get the name of the Device in the Driver?

Is it possible to get the DEVICE name in the DRIVER (custom of course).

I have multiple DEVICEs and would like to know which one I'm working on.

Alan

Have you tried “device.name” and/or “device.label” ?

Here's an example of what I use . . .

    if (logEnable) log.debug "installed ${device.label?device.label:device.name} ..."

This will choose device.label if its defined, else device.name.

2 Likes

Just use device.displayName...

4 Likes

device.xxxx gives the driver information.

I worked around the issue based on another field that i have defining a title that gives me enough information.

Alan

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.