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

Function builder

src/commands/locations/modes/setcurrent.ts:19–37  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

17const describe = 'set the current mode'
18
19const builder = (yargs: Argv): Argv<CommandArgs> =>
20 apiCommandBuilder(yargs)
21 .positional('id', { describe: 'mode id', type: 'string' })
22 .option('location', { alias: 'l', describe: 'a specific location to query', type: 'string' })
23 .example([
24 [
25 '$0 locations:modes:setcurrent',
26 'select a mode from a list of all modes and set it to be current for its location',
27 ],
28 [
29 '$0 locations:modes:setcurrent --location 5dfd6626-ab1d-42da-bb76-90def3153998',
30 'select a mode from a list of modes in the specified location and set it to be current',
31 ],
32 [
33 '$0 locations:modes:setcurrent 636169e4-8b9f-4438-a941-953b0d617231',
34 'set the specified mode to be current for its location',
35 ],
36 ])
37 .epilog(buildEpilog({ command, apiDocs: 'changeMode' }))
38
39const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
40 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected