(yargs: Argv)
| 33 | const describe = 'create a new device profile and device configuration' |
| 34 | |
| 35 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 36 | inputAndOutputItemBuilder(apiOrganizationCommandBuilder(yargs)) |
| 37 | .example([ |
| 38 | [ |
| 39 | '$0 deviceprofiles:view:create -i view.yaml', |
| 40 | 'create a device profile and device configuration as defined in view.yaml', |
| 41 | ], |
| 42 | ]) |
| 43 | .epilog(buildEpilog({ |
| 44 | command, |
| 45 | formattedNotes: 'Creates a new device profile and device configuration. Unlike deviceprofiles:create, ' + |
| 46 | 'this command accepts a consolidated object that can include a device configuration ' + |
| 47 | 'in a property named "view".\n\n' + |
| 48 | 'A simple example, written in YAML:\n\n' + |
| 49 | 'name: Test Switch\n' + |
| 50 | 'components:\n' + |
| 51 | ' - id: main\n' + |
| 52 | ' capabilities:\n' + |
| 53 | ' - id: switch\n' + |
| 54 | 'view:\n' + |
| 55 | ' dashboard:\n' + |
| 56 | ' states:\n' + |
| 57 | ' - capability: switch\n' + |
| 58 | ' actions:\n' + |
| 59 | ' - capability: switch\n' + |
| 60 | ' detailView:\n' + |
| 61 | ' - capability: switch\n' + |
| 62 | ' automation:\n' + |
| 63 | ' conditions:\n' + |
| 64 | ' - capability: switch', |
| 65 | apiDocs: ['createDeviceProfile', 'createDeviceConfiguration', 'updateDeviceProfile', 'generateDeviceConfig'], |
| 66 | })) |
| 67 | |
| 68 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 69 | const command = await apiOrganizationCommand(argv) |
nothing calls this directly
no test coverage detected