Get devices supported commands?

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

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 Likes

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

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.

1 Like