MCPcopy Create free account
hub / github.com/blinker-iot/blinker-js / turnSwitch

Function turnSwitch

example/example.ts:115–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113// 开关切换
114let switchState = false
115function turnSwitch() {
116 switchState = !switchState
117 device.log("切换设备状态为" + (switchState ? 'on' : 'off'))
118 return switchState ? 'on' : 'off'
119}

Callers 1

example.tsFile · 0.70

Calls 1

logMethod · 0.80

Tested by

no test coverage detected