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

Function createEvents

src/commands/virtualdevices/events.ts:65–68  ·  view source on GitHub ↗
(_: void, input: DeviceEvent[])

Source from the content-addressed store, hash-verified

63 const deviceId = await chooseDeviceFn({ type: DeviceIntegrationType.VIRTUAL })(command, argv.deviceId)
64
65 const createEvents = async (_: void, input: DeviceEvent[]): Promise<EventInputOutput[]> => {
66 const output = await command.client.virtualDevices.createEvents(deviceId, input)
67 return input.map((event, index) => ({ event, stateChange: output.stateChanges[index] }))
68 }
69 // TODO: This really should provide separate input processors for command line input and
70 // user input rather than doing it all in `getInputFromUser`
71 await inputAndOutputItem<DeviceEvent[], EventInputOutput[]>(

Callers 1

events.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected