From 0dbf6fdc4f4146cfebd93d0c9ce615894cf32059 Mon Sep 17 00:00:00 2001 From: Liz Cray Date: Tue, 17 Dec 2024 23:41:16 -0500 Subject: [PATCH] Filter for open events --- watcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watcher.js b/watcher.js index 9bafddc..dc0a3a8 100644 --- a/watcher.js +++ b/watcher.js @@ -26,7 +26,7 @@ ws.on('message', msg => { }).catch(error => { console.error(error) }) - if (device.openScript){ + if (device.openScript && data.state[device.valueKey]){ console.log("Running open script") try { console.log(exec.execSync(device.openScript).toString())