Current state of K's activity timer

This commit is contained in:
2023-10-02 15:53:45 -04:00
parent 915183c899
commit cc21c329fe
6 changed files with 82 additions and 0 deletions

15
kallen-timer/lights.js Normal file
View 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
}