Disable flow from anoter flow?

Hi everyone. I programmed most of my sensor / switch / light automations in a flow.
Now, for security reasons, I would like to be able to disable all these automations when I'm not home (I have an input_boolean.home virtual switch that indicates home/away status based on device trackers).

Is it possible to create a sequence (from another flow that is always enabled) that can disable or enable my "home automation" flow completely? Or do I need to create a switch node that "limits" each automation?

Thanks,
Rodrigo

Save the boolean switch to a global context variable. Then in all flows you wish to disable/able you can add a switch node and set the property to the global variable, then in the rule you can add the value you wish to allow the msg to pass.
e.g.

[{"id":"907cc07528150308","type":"inject","z":"30306197ead446be","name":"input boolen true","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":140,"y":640,"wires":[["0d7c543b3b8f4e67"]]},{"id":"0d7c543b3b8f4e67","type":"change","z":"30306197ead446be","name":"","rules":[{"t":"set","p":"boolean_pass","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":660,"wires":[[]]},{"id":"e5b30c75d3526748","type":"inject","z":"30306197ead446be","name":"input boolen false","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":150,"y":680,"wires":[["0d7c543b3b8f4e67"]]},{"id":"ca358979c0a6c31f","type":"inject","z":"30306197ead446be","name":"flow","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":880,"wires":[["7263449e6eb9a0be"]]},{"id":"7263449e6eb9a0be","type":"switch","z":"30306197ead446be","name":"","property":"boolean_pass","propertyType":"global","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":270,"y":880,"wires":[["24ca65c4d8110e07"]]},{"id":"24ca65c4d8110e07","type":"debug","z":"30306197ead446be","name":"debug 226","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":410,"y":880,"wires":[]}]
1 Like

I don't know about "home automation" flows, (as few here use HA, preferring to use node red to do everything), but if you are talking about node-red then have a look at node-red-contrib-simple-gate, which you can put inline in any flow and use it to block or allow messages based on control messages that you can send it.

Yea, I thought about this, just hoping there was an easier solution... Thanks!

Hello,

maybe I misunderstood but you can enable/disable flows by name:
https://flows.nodered.org/flow/0b69bd593a562a308ef0ef7de0a95a67

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.