Pardon this indirect answer for now… (it’s typical CosmicPuppy answer…):
I presume you are referring to from within a SmartApp?
Inside a SmartApp, the device instances you access are instances of class Device. Refer to Reference Material here: https://graph.api.smartthings.com/ide/doc/device ; but, note that there may be undocumented methods and attributes.
(NB: You are not accessing the class SmartDevice Type, even though they have some similar attributes and methods).
Based on the attributes and methods of Device, I am not sure you can determine lower level characteristics*, or even the data from the “factory” SmartDevice Type class that instantiated the Device. * Except you CAN ask it for it’s list of “
But, I must stress this: You are not supposed to. The Device is a instantiated interface to the physical Thing. It is an abstraction. If SmartApps started making assumptions or starting prying into the detailed nature of the real-world Thing, then the isolation between SmartApps and Things would break. All the information you need must and can only come from Device’s reported Capabilities.
If a Sonos has
capability.switch, then, yes, indeed, any SmartApp that can turn a light on and off could also turn the Sonos on and off. If someone wrote a SmartApp that detected it was a Sonos (rather than checking for
capability.musicPlayer and decided to play music on it, then that SmartApp would fail to work with non-Sonos players and other Music Playing SmartApps would have to share that “cheating” peek into the Device Type).
When used according to spec, we should be able to swap-out one Thing for another Thing completely seamlessly (i.e., breaking zero SmartApps), if and only if they have the exact same Capabilities.
@matthewnohr may confirm, clarify, or correct me? – but I welcome your comments and questions.
…CP / Terry.