(yargs: Argv)
| 28 | const describe = "get the current status of a device component's attributes" |
| 29 | |
| 30 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 31 | formatAndWriteItemBuilder(apiCommandBuilder(yargs)) |
| 32 | .positional('device-id-or-index', |
| 33 | { describe: 'device id or index in list from devices command', type: 'string' }) |
| 34 | .positional('component-id', { describe: 'component id', type: 'string' }) |
| 35 | .example([ |
| 36 | ['$0 devices:capability-status', |
| 37 | 'prompt for a device and component and display its status'], |
| 38 | ['$0 devices:capability-status fa1eb54c-c571-405f-8817-ffb7cd2f5a9d', |
| 39 | 'prompt for a component for the specified device and display its status'], |
| 40 | ['$0 devices:capability-status 12', |
| 41 | 'prompt for a component for the twelfth device found when running "smartthings devices"' + |
| 42 | ' and display its status'], |
| 43 | ['$0 devices:capability-status fa1eb54c-c571-405f-8817-ffb7cd2f5a9d main', |
| 44 | 'display the status for the specified device and component'], |
| 45 | ]) |
| 46 | .epilog(buildEpilog({ command, apiDocs: ['getDeviceComponentStatus'] })) |
| 47 | |
| 48 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 49 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected