Fix upstairs hallway motion lighting
This commit is contained in:
@ -19,7 +19,7 @@ let hallwayAction = {}
|
||||
if (payload === 'on') {
|
||||
if (goodnight === 'on') {
|
||||
hallwayAction = 'off'
|
||||
} else if (nightMode === 'on' || peopleSleeping === true) {
|
||||
} else if (nightMode === 'on' || (peopleSleeping === true && earlyNightMode === 'on')) {
|
||||
hallwayAction = 'on'
|
||||
hallwayScene = 'Nightlight'
|
||||
} else if (earlyNightMode === 'on') {
|
||||
@ -46,7 +46,7 @@ if (payload === 'on') {
|
||||
node.status({fill:'red',shape:'ring',text:'Too bright'})
|
||||
}
|
||||
} else if (payload === 'off') {
|
||||
if (stairwellLights === 'on') {
|
||||
if (stairwellLights === 'on' || hallwayLights === 'on') {
|
||||
msg.duration = newDuration
|
||||
node.status({fill:"green",shape:"dot",text:parseInt(duration) + ' minutes'})
|
||||
node.send([null,msg,null,null])
|
||||
|
Reference in New Issue
Block a user