A handy way for testing different ways of doing something in your flows

Definitely visually cleaner.

Also, logically a bit tighter, although you have to ignore the warnings. Perhaps it would be good to have an option to suppress the warnings for uses like this.

[{"id":"1ffc9bbb08552d04","type":"gate","z":"7b70bf3ccc9b1efa","name":"","controlTopic":"control","defaultState":"open","openCmd":"open1","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memoryOnly","x":470,"y":260,"wires":[["0a5b8c19ba0fcc8a"]]},{"id":"17c46c6a6535a1b8","type":"gate","z":"7b70bf3ccc9b1efa","name":"","controlTopic":"control","defaultState":"open","openCmd":"open2","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memoryOnly","x":470,"y":320,"wires":[["692b0679192eb19b"]]},{"id":"fd4d38baa2c530c1","type":"gate","z":"7b70bf3ccc9b1efa","name":"","controlTopic":"control","defaultState":"open","openCmd":"open3","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memoryOnly","x":470,"y":380,"wires":[["c3fae2f0730f4642"]]},{"id":"afad83419cba4c4b","type":"gate","z":"7b70bf3ccc9b1efa","name":"","controlTopic":"control","defaultState":"open","openCmd":"open4","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memoryOnly","x":470,"y":440,"wires":[["6392e55df30efb9b"]]},{"id":"5ce08cc87cec016e","type":"inject","z":"7b70bf3ccc9b1efa","name":"1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"open1","payloadType":"str","x":230,"y":100,"wires":[["f3ceb6fbd35edf47"]]},{"id":"f3ceb6fbd35edf47","type":"function","z":"7b70bf3ccc9b1efa","name":"","func":"let msg0 = {payload:'close', topic:'control'}\nnode.send (msg0)\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":160,"wires":[["373985c65f543143"]]},{"id":"e953f0eb5e705a34","type":"inject","z":"7b70bf3ccc9b1efa","name":"2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"open2","payloadType":"str","x":230,"y":140,"wires":[["f3ceb6fbd35edf47"]]},{"id":"c4c7130f5540f3a1","type":"inject","z":"7b70bf3ccc9b1efa","name":"3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"open3","payloadType":"str","x":230,"y":180,"wires":[["f3ceb6fbd35edf47"]]},{"id":"082260d87c0be51b","type":"inject","z":"7b70bf3ccc9b1efa","name":"4","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"open4","payloadType":"str","x":230,"y":220,"wires":[["f3ceb6fbd35edf47"]]},{"id":"0a5b8c19ba0fcc8a","type":"debug","z":"7b70bf3ccc9b1efa","name":"To option 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":260,"wires":[]},{"id":"692b0679192eb19b","type":"debug","z":"7b70bf3ccc9b1efa","name":"To option 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":320,"wires":[]},{"id":"c3fae2f0730f4642","type":"debug","z":"7b70bf3ccc9b1efa","name":"To option 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":380,"wires":[]},{"id":"6392e55df30efb9b","type":"debug","z":"7b70bf3ccc9b1efa","name":"To option 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":440,"wires":[]},{"id":"1226459e1a7d6acc","type":"inject","z":"7b70bf3ccc9b1efa","name":"Incoming message","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":190,"y":260,"wires":[["373985c65f543143"]]},{"id":"cdef125c1307bf15","type":"link in","z":"7b70bf3ccc9b1efa","name":"","links":["373985c65f543143"],"x":315,"y":340,"wires":[["1ffc9bbb08552d04","17c46c6a6535a1b8","fd4d38baa2c530c1","afad83419cba4c4b"]]},{"id":"373985c65f543143","type":"link out","z":"7b70bf3ccc9b1efa","name":"","mode":"link","links":["cdef125c1307bf15"],"x":555,"y":160,"wires":[]}]
1 Like