Fix condition for master bedroom motion lighting
This commit is contained in:
@ -10,7 +10,7 @@ const nightMode = states['input_boolean.night_mode'].state
|
||||
const payload = msg.payload
|
||||
const newDuration = duration * 60
|
||||
|
||||
if (peopleSleeping === true && nightMode === 'off') {
|
||||
if (peopleSleeping === false && nightMode === 'off') {
|
||||
if (payload === 'on') {
|
||||
if (lux <= threshold || lights === 'on') {
|
||||
node.status({fill:'green',shape:'dot',text:'Lights On'})
|
||||
|
Reference in New Issue
Block a user