Operate motion timer regardless of lux, if lights are already on

This commit is contained in:
2023-11-10 13:14:33 -05:00
parent 378e1c8533
commit 3ea6b07b94

View File

@ -7,7 +7,7 @@ const payload = msg.payload
const newDuration = duration * 60
if (payload === 'on') {
if (lux <= threshold) {
if (lux <= threshold || lights === 'on') {
node.status({fill:'green',shape:'dot',text:'Lights On'})
node.send([msg,null])
} else {