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