MCPcopy Index your code
hub / github.com/SmartThingsCommunity/smartthings-cli / handler

Function handler

src/commands/scenes/execute.ts:33–44  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

31
32
33const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
34 const command = await apiCommand(argv)
35
36 const sceneId = await chooseScene(command, argv.id)
37
38 const result = await command.client.scenes.execute(sceneId)
39 if (result.status === SuccessStatusValue.status) {
40 console.log('Scene executed successfully')
41 } else {
42 console.error(`Error "${result.status}" executing ${sceneId}.`)
43 }
44}
45
46const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
47export default cmd

Callers

nothing calls this directly

Calls 1

apiCommandFunction · 0.85

Tested by

no test coverage detected