Add warning to wife's presence flow function
This commit is contained in:
@ -3,12 +3,13 @@ const workEndZone = states['binary_sensor.tina_work_end_zone'].state
|
|||||||
const tinawork = msg.tinawork
|
const tinawork = msg.tinawork
|
||||||
|
|
||||||
if (tinawork === 'on' && workEndZone === 'on') {
|
if (tinawork === 'on' && workEndZone === 'on') {
|
||||||
node.status({fill:"green",shape:"dot",text:"Activated"});
|
node.status({fill:"green",shape:"dot",text:"Activated"})
|
||||||
return[msg,null]
|
return[msg,null]
|
||||||
} else if (tinawork === 'off') {
|
} else if (tinawork === 'off') {
|
||||||
node.status({fill:"yellow",shape:"dot",text:"No Work Today"});
|
node.status({fill:"yellow",shape:"dot",text:"No Work Today"})
|
||||||
return null
|
return null
|
||||||
} else {
|
} else {
|
||||||
node.status({fill:"red",shape:"ring",text:"We fucked up"});
|
node.status({fill:"red",shape:"ring",text:"We fucked up"})
|
||||||
|
node.warn("Tina presence flow encountered a situation we did not account for")
|
||||||
return[null,msg]
|
return[null,msg]
|
||||||
}
|
}
|
Reference in New Issue
Block a user