Improve motion lighting in some rooms
Motion lighting should no longer reset lights to adaptive when scene or brightness has been changed manually
This commit is contained in:
@ -9,11 +9,15 @@ const newDuration = duration * 60
|
||||
|
||||
if (sleeping === 'off') {
|
||||
if (payload === 'on') {
|
||||
if (lux <= threshold || lights === 'on') {
|
||||
node.status({fill:'green',shape:'dot',text:'Lights On'})
|
||||
if (lux <= threshold && lights === 'off') {
|
||||
node.status({fill:'green',shape:'dot',text:'Turning lights on'})
|
||||
node.send([msg,null])
|
||||
} else {
|
||||
node.status({fill:'red',shape:'ring',text:'Too bright'})
|
||||
if (lights === 'off') {
|
||||
node.status({fill:'red',shape:'ring',text:'Lights already on'})
|
||||
} else {
|
||||
node.status({fill:'red',shape:'ring',text:'Too bright'})
|
||||
}
|
||||
}
|
||||
} else if (payload === 'off') {
|
||||
if (lights === 'on') {
|
||||
|
Reference in New Issue
Block a user