Current state of K's activity timer
This commit is contained in:
15
kallen-timer/lights.js
Normal file
15
kallen-timer/lights.js
Normal file
@ -0,0 +1,15 @@
|
||||
if (msg.lights === 'on') {
|
||||
if (msg.room === 'Kallen Bedroom') {
|
||||
node.status({fill:"green",shape:"dot",text:"Lights Controlled"})
|
||||
return[msg,null]
|
||||
} else if (msg.room === 'Living Room') {
|
||||
node.status({fill:"green",shape:"dot",text:"Lights Controlled"})
|
||||
return[null,msg]
|
||||
} else {
|
||||
node.status({fill:"red",shape:"ring",text:"N/A in " + msg.room})
|
||||
return null
|
||||
}
|
||||
} else {
|
||||
node.status({fill:"red",shape:"ring",text:"Disabled"})
|
||||
return null
|
||||
}
|
Reference in New Issue
Block a user