From 900647d12a6d1d2c73c12a38ee61d2b0d8660f96 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Mon, 2 Oct 2023 15:58:56 -0400 Subject: [PATCH] Initial replacement for entry flow --- kallen-timer/processing.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 kallen-timer/processing.js diff --git a/kallen-timer/processing.js b/kallen-timer/processing.js new file mode 100644 index 0000000..c950381 --- /dev/null +++ b/kallen-timer/processing.js @@ -0,0 +1,12 @@ +const states = global.get('homeassistant.homeAssistant.states') +const timer = states['timer.kallen_timer'].state + +// Basic replacement for current entry flow + +if (timer === 'idle') { + node.send([msg,null,null]) +} else if (timer === 'active') { + node.send([null,msg,null]) +} else if (timer === 'paused') { + node.send([null,null,msg]) +} \ No newline at end of file