Operate motion timer regardless of lux, if lights are already on
This commit is contained in:
@@ -7,7 +7,7 @@ const payload = msg.payload
|
|||||||
const newDuration = duration * 60
|
const newDuration = duration * 60
|
||||||
|
|
||||||
if (payload === 'on') {
|
if (payload === 'on') {
|
||||||
if (lux <= threshold) {
|
if (lux <= threshold || lights === 'on') {
|
||||||
node.status({fill:'green',shape:'dot',text:'Lights On'})
|
node.status({fill:'green',shape:'dot',text:'Lights On'})
|
||||||
node.send([msg,null])
|
node.send([msg,null])
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user