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

Function builder

src/commands/deviceprofiles/create.ts:36–49  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

34const describe = 'create a new device profile'
35
36const builder = (yargs: Argv): Argv<CommandArgs> =>
37 inputAndOutputItemBuilder(apiOrganizationCommandBuilder(yargs))
38 .example([
39 ['$0 deviceprofiles:create', 'create a device profile from prompted input'],
40 ['$0 deviceprofiles:create --dry-run', 'build JSON for a device profile from prompted input'],
41 ['$0 deviceprofiles:create -i my-profile.yaml', 'create a device profile defined in "my-profile.yaml'],
42 ])
43 .epilog(buildEpilog({
44 command,
45 apiDocs: 'createDeviceProfile',
46 notes: 'Creates a new device profile. If a vid field is not present in the metadata' +
47 ' then a default device presentation will be created for this profile and the' +
48 ' vid set to reference it.',
49 }))
50
51const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
52 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 3

buildEpilogFunction · 0.85

Tested by

no test coverage detected