Fix condition for master bedroom motion lighting

This commit is contained in:
2024-02-22 15:54:30 -05:00
parent dea5b6d44d
commit 985c12b1d2

View File

@ -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'})