We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 31fb9b4 + 782b7e2 commit a754f46Copy full SHA for a754f46
1 file changed
examples/switch-js/index.js
@@ -34,8 +34,7 @@ async function main() {
34
// This is called when Alexa/Google Home sends a command
35
mySwitch.onPowerState(async (deviceId, state) => {
36
console.log(`\n[Callback] Device ${deviceId} turned ${state ? 'ON' : 'OFF'}`);
37
- console.log(' Source: Alexa/Google Home/SinricPro App');
38
-
+
39
// Update local state
40
devicePowerState = state;
41
@@ -44,9 +43,6 @@ async function main() {
44
43
// - GPIO.write(LED_PIN, state);
45
// - relay.setState(state);
46
// - httpRequest('http://192.168.1.100/switch', { state });
47
48
- console.log(` Action: Simulated hardware is now ${state ? 'ON' : 'OFF'}`);
49
50
return true; // Return true if successful, false if failed
51
});
52
0 commit comments