Hi everyone, I’m trying to create a sequence that reacts based on multiple device states. This led me to install the node-red-contrib-bool-gate node, which triggers only if multiple conditions are met. So far so good.
[{"id":"fbef87b08305041b","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"46a5c4966a601184","type":"and-gate","z":"fbef87b08305041b","name":"","rules":[{"t":"eq","v":"on","vt":"str","propertyType":"msg","property":"payload","topic":"light.feet_light"},{"t":"eq","v":"on","vt":"str","propertyType":"msg","property":"payload","topic":"light.tv_light"},{"t":"eq","v":"on","vt":"str","propertyType":"msg","property":"payload","topic":"light.door"}],"outputTopic":"","gateType":"and","emitOnlyIfTrue":false,"x":520,"y":180,"wires":[["4dea3c3c03f81831","ebcce3cd6bb98ef1"]]},{"id":"6362bc6a36c76b8e","type":"server-state-changed","z":"fbef87b08305041b","name":"","server":"8a86b0cc.b2bac","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.feet_light","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":240,"y":180,"wires":[["46a5c4966a601184"],[]]},{"id":"15e6fe8d397c9b40","type":"server-state-changed","z":"fbef87b08305041b","name":"","server":"8a86b0cc.b2bac","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.tv_light","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"1","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":240,"y":240,"wires":[["46a5c4966a601184"],[]]},{"id":"ee29167b8a4fe096","type":"server-state-changed","z":"fbef87b08305041b","name":"","server":"8a86b0cc.b2bac","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.door","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":230,"y":300,"wires":[["46a5c4966a601184"],[]]},{"id":"ebcce3cd6bb98ef1","type":"debug","z":"fbef87b08305041b","name":"debug 23","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":720,"y":180,"wires":[]},{"id":"4dea3c3c03f81831","type":"api-call-service","z":"fbef87b08305041b","name":"","server":"8a86b0cc.b2bac","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.sonoff_ceiling_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":720,"y":260,"wires":[[]]},{"id":"8a86b0cc.b2bac","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]
The thing here is that this node only has one output and it only reacts when it turns “TRUE”, but when it becomes FALSE (it shows a red dot and says FALSE) it doesn’t do anything. Can anyone recommend another way around this? Or am I missing something?
Thanks,
Rodrigo