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

Function builder

src/commands/devices/component-status.ts:30–46  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

28const describe = "get the current status of a device component's attributes"
29
30const 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
48const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
49 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected