Is it possible to "sniff out" what device handler is used?

Just a long shot but is it possible after a user selects an input device within a smartapp configuration to be able to determine something about that selected input devices’ handler? Say it’s name for example. I need my smartapp to make an IF - THEN branch based on what device handler is used for fan speed control.

I’d recommend using device.getSupportedCommands() or hasCommand(). With that command you can find out which commands are available from the DTH. If the DTH supports the command you want to execute then execute command.

You can also use getSupportedAttributes() or hasAttribute() for available attributes.

http://docs.smartthings.com/en/latest/ref-docs/device-ref.html#getsupportedattributes

4 Likes