Get devices supported commands?


#1

Can anyone point me to a function that will retrieve a devices available commands such as does it support playTrack, playText, speak, playTrackAndRestore, etc..


#2

Is this what you are looking for?

device.supportedCommands()

https://docs.hubitat.com/index.php?title=Device_Object

Their docs have a lot of hidden gems that I scan through every now and then. Not much detail but the method names usually tell me what's available.


#3

Possibly so. Thank you, I'll give it a shot.


#4

Also, if you are looking to check for a specific capability you can use

device.hasCapability("capability")

I use this in my ABC child app to check for specific button device capabilities.