Hello Community,
may someone can share her/his thoughts about this and help with a hint.
I tried to turn an ui_switch ON/OFF out of a different flow by setting a global.variable. The problem now is how to sync the state of the ui_switch (e.g. in flow#1) with the global.variable (e.g. in flow#2)? I know this classic link-options shown in my flow but I wonder if there are other solutions to synchronize the global.variable set in a different flow (e.g. flow#2) with the state of the ui_switch (e.g. in flow#1). Like a kind of "on-change-event" or so? I found the STATUS-Node but didn't got it working.
To use a timer to read out global.variable value and push it to the ui_switch doesn't seem to be an elegant solution
[{"id":"104ea173.eaf9ff","type":"ui_switch","z":"bab42f9.6e663d","name":"","label":"switch1","tooltip":"","group":"7d6bc9d7.e86ff8","order":0,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"x":140,"y":120,"wires":[["f48189de.d44db8"]]},{"id":"f48189de.d44db8","type":"change","z":"bab42f9.6e663d","name":"","rules":[{"t":"set","p":"varTest1","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":120,"wires":[["cf3c0c2b.3fbe5","104ea173.eaf9ff"]]},{"id":"2e3a9596.bd642a","type":"inject","z":"bab42f9.6e663d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":150,"y":180,"wires":[["f48189de.d44db8"]]},{"id":"cf3c0c2b.3fbe5","type":"debug","z":"bab42f9.6e663d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":120,"wires":[]},{"id":"45e2194a.83fe68","type":"inject","z":"bab42f9.6e663d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":150,"y":220,"wires":[["f48189de.d44db8"]]},{"id":"8d3c3728.1348b8","type":"inject","z":"bab42f9.6e663d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":150,"y":420,"wires":[["9ebcd414.26ef48"]]},{"id":"1a627e8d.49d3d1","type":"inject","z":"bab42f9.6e663d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":150,"y":380,"wires":[["9ebcd414.26ef48"]]},{"id":"9ebcd414.26ef48","type":"change","z":"bab42f9.6e663d","name":"","rules":[{"t":"set","p":"varTest1","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":380,"wires":[["d6a5b885.76e518","89ae2399.040eb","104ea173.eaf9ff"]]},{"id":"d6a5b885.76e518","type":"debug","z":"bab42f9.6e663d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":380,"wires":[]},{"id":"b450a5a3.2c0bb8","type":"comment","z":"bab42f9.6e663d","name":"Can I avoid using this kind of connection?","info":"","x":440,"y":280,"wires":[]},{"id":"2b7f6532.0431aa","type":"link in","z":"bab42f9.6e663d","name":"link in","links":[],"x":555,"y":240,"wires":[["104ea173.eaf9ff"]]},{"id":"89ae2399.040eb","type":"link out","z":"bab42f9.6e663d","name":"link out","links":[],"x":555,"y":320,"wires":[]},{"id":"cb4e8138.4d894","type":"comment","z":"bab42f9.6e663d","name":"flow #2","info":"","x":70,"y":340,"wires":[]},{"id":"36c01f95.79d4b","type":"comment","z":"bab42f9.6e663d","name":"flow #1","info":"","x":70,"y":80,"wires":[]},{"id":"7d6bc9d7.e86ff8","type":"ui_group","name":"Group 1","tab":"8375fe35.96f7","order":1,"disp":true,"width":6},{"id":"8375fe35.96f7","type":"ui_tab","name":"Problem","icon":"dashboard","order":14,"disabled":false,"hidden":false}]