Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save tinwritescode/52ab5a2729d8f3e02397ecb798c05530 to your computer and use it in GitHub Desktop.

Select an option

Save tinwritescode/52ab5a2729d8f3e02397ecb798c05530 to your computer and use it in GitHub Desktop.
[{"id":"ec8a40a1.f2e4d","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"b573f57d.6290e8","type":"ui_button","z":"ec8a40a1.f2e4d","name":"","group":"1b214600.17935a","order":3,"width":0,"height":0,"passthru":false,"label":"Do stuff","tooltip":"","color":"","bgcolor":"","icon":"","payload":"textInput","payloadType":"flow","topic":"","x":300,"y":340,"wires":[["cc26e2d4.ffd35","b42b2908.665408"]]},{"id":"1330b995.eb0626","type":"ui_text_input","z":"ec8a40a1.f2e4d","name":"","label":"","tooltip":"","group":"1b214600.17935a","order":1,"width":0,"height":0,"passthru":true,"mode":"text","delay":"100","topic":"","topicType":"str","x":280,"y":280,"wires":[["7ba1f4df.b12a7c","2ffeee02.29d762"]]},{"id":"cc26e2d4.ffd35","type":"function","z":"ec8a40a1.f2e4d","name":"my function that does stuff","func":"msg.payload += \" - payload modified in my function\"\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":340,"wires":[["bcad70c7.b9db","a0241251.a9cc4"]]},{"id":"bcad70c7.b9db","type":"ui_text","z":"ec8a40a1.f2e4d","group":"1b214600.17935a","order":2,"width":0,"height":0,"name":"","label":"Result: ","format":"{{msg.payload}}","layout":"row-left","x":740,"y":340,"wires":[]},{"id":"2ffeee02.29d762","type":"change","z":"ec8a40a1.f2e4d","name":"","rules":[{"t":"set","p":"textInput","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":280,"wires":[["fe2d6e02.ad949"]]},{"id":"7ba1f4df.b12a7c","type":"debug","z":"ec8a40a1.f2e4d","name":"Text entry debug node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":480,"y":240,"wires":[]},{"id":"b42b2908.665408","type":"debug","z":"ec8a40a1.f2e4d","name":"Button click debug node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":490,"y":400,"wires":[]},{"id":"fe2d6e02.ad949","type":"switch","z":"ec8a40a1.f2e4d","name":"is text empty?","property":"textInput","propertyType":"flow","rules":[{"t":"empty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":660,"y":280,"wires":[["db2479e4.104468"],["fa23a260.4e161"]]},{"id":"db2479e4.104468","type":"change","z":"ec8a40a1.f2e4d","name":"enabled false","rules":[{"t":"set","p":"enabled","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":260,"wires":[["eb06ed9d.7f23f"]]},{"id":"fa23a260.4e161","type":"change","z":"ec8a40a1.f2e4d","name":"enabled true","rules":[{"t":"set","p":"enabled","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":300,"wires":[["eb06ed9d.7f23f"]]},{"id":"eb06ed9d.7f23f","type":"link out","z":"ec8a40a1.f2e4d","name":"","links":["58d47e08.81ffc"],"x":955,"y":280,"wires":[]},{"id":"58d47e08.81ffc","type":"link in","z":"ec8a40a1.f2e4d","name":"","links":["eb06ed9d.7f23f"],"x":215,"y":340,"wires":[["b573f57d.6290e8"]]},{"id":"93b54b1c.311778","type":"inject","z":"ec8a40a1.f2e4d","name":"Init with empty string","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":180,"y":240,"wires":[["1330b995.eb0626"]]},{"id":"a0241251.a9cc4","type":"debug","z":"ec8a40a1.f2e4d","name":"After function debug node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":790,"y":400,"wires":[]},{"id":"1b214600.17935a","type":"ui_group","name":"Default","tab":"b8fb94f4.0d31d8","order":1,"disp":true,"width":"12","collapse":false},{"id":"b8fb94f4.0d31d8","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment