12 lines
343 B
JavaScript
12 lines
343 B
JavaScript
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])
|
|
} |