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

Function builder

src/commands/devices/health.ts:28–42  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

26const describe = 'get the current health status of a device'
27
28const builder = (yargs: Argv): Argv<CommandArgs> =>
29 formatAndWriteItemBuilder(apiCommandBuilder(yargs))
30 .positional('id-or-index', { describe: 'device id or number from list', type: 'string' })
31 .example([
32 ['$0 devices:health', 'choose a device from a list and display its health status'],
33 [
34 '$0 devices:health 3',
35 'display the health status for the third device listed when running "smartthings devices"',
36 ],
37 [
38 '$0 devices:health a13a3fbb-2b97-4c73-978d-ae7c2fca3ea8',
39 'display the health status for the specified device',
40 ],
41 ])
42 .epilog(buildEpilog({ command }))
43
44const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
45 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected