Where to get the devicetype in the device object

(Martin Verbeek) #1

When i go through my child devices in the smartapp, i need to know the devicetype of the device (the app controls multiple). What is the name of the field where the devicetype is stored…

(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

Here’s the “RTFM” link, which I recommend even though Device Type is not an explicit Property.

You can check the supported “Capability(s)”, Commands, etc. of the Device Object…



Lol… :stuck_out_tongue_closed_eyes:

(Martin Verbeek) #4

Did rtfm and google before posting :wink: . I thought there must be a property as it is listed in my devices. Will solve it differently.

(Martin Verbeek) #5

found it…the answer is typeName. A it.getProperties().toString() did the trick.

(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #6


We can actually do an edit & pull request on the Documentation (it’s a public GitHub), but just tagging @jim instead.