SmartThings Community

Get Model Name in a DTH

(Arn B) #1

I am attempting to get the device’s model name in a DTH, however everything I have tried throws an error. Is there any way to get this information in ST? getModelName() works perfectly in a SmartApp.

Forgive me if this has been solved years ago, I cannot find an answer with a forum search.

My DTH code failures
if (device.getModelName()==‘something’)
if (device.mode.model==‘something’)

(Tom Manley) #2

This should work for a Zigbee device device.getDataValue("model")

3 Likes
(Arn B) #3

Thank you for the fast and accurate response. That worked!

2 Likes