MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / builder

Function builder

src/commands/devices/capability-status.ts:34–48  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

32const describe = "get the current status of all of a device capability's attributes"
33
34const builder = (yargs: Argv): Argv<CommandArgs> =>
35 formatAndWriteItemBuilder(apiCommandBuilder(yargs))
36 .positional('device-id-or-index',
37 { describe: 'device id or index in list from devices command', type: 'string' })
38 .positional('component-id', { describe: 'component id', type: 'string' })
39 .positional('capability-id', { describe: 'capability id', type: 'string' })
40 .example([
41 ['$0 devices:capability-status',
42 'prompt for a device, component, and capability, then display its status'],
43 ['$0 devices:capability-status fa1eb54c-c571-405f-8817-ffb7cd2f5a9d',
44 'prompt for a component and capability for the specified device'],
45 ['$0 devices:capability-status fa1eb54c-c571-405f-8817-ffb7cd2f5a9d main switch',
46 'display the status for the specified device, component, and capability'],
47 ])
48 .epilog(buildEpilog({ command, apiDocs: 'getDeviceStatusByCapability' }))
49
50export const buildTableOutput = (
51 tableGenerator: TableGenerator,

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected