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

Function builder

src/commands/devices/status.ts:21–29  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

19const describe = "get the current status of all of a device's component's attributes"
20
21const builder = (yargs: Argv): Argv<CommandArgs> =>
22 formatAndWriteItemBuilder(apiCommandBuilder(yargs))
23 .positional('id-or-index', { describe: 'the device id or number in list', type: 'string' })
24 .example([
25 ['$0 devices:status', 'prompt for a device and display its component\'s attributes'],
26 ['$0 devices:status 3', 'display component attributes for third device listed in output of devices command'],
27 ['$0 devices:status eee23fb0-38cd-4f07-be6d-dec9000b41fe', 'display component attributes for device by id'],
28 ])
29 .epilog(buildEpilog({ command, apiDocs: ['getDeviceStatus'] }))
30
31const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
32 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected