This is the flow
PS I made a small change to allow you to send the value as parameter instead of hard-coded (maybe not needed)
[{"id":"c340cad4.302a18","type":"ui_template","z":"d01d2553.fd9838","group":"cac67f0e.f01fa","name":"","order":0,"width":0,"height":0,"format":"<script id=\"clockScript1\" type=\"text/javascript\">\n var param = 'lets change';\n var theScope = scope;\n var clockInterval;\n $(function () {\n if (clockInterval) return;\n/*\n //add logo\n var div1 = $('<div/>');\n var logo = new Image();\n\n logo.src = '/wieland_logo.jpeg'\n logo.height = 45;\n div1[0].style.margin = '10px auto';\n\n div1.append(logo);\n*/\n //add clock\n var div2 = $('<div/>');\n var p = $('<p/>');\n\n div2.append(p);\n div2[0].style.margin = '5px';\n \n\n function displayTime() {\n p.text(new Date().toLocaleString());\n }\n \n clockInterval = setInterval(displayTime, 1000);\n\n // add Text\n var div4 = $('<div/>');\n var t = document.createTextNode(\"TRAINING\"); // hier den Title eingeben\n div4.append(t)\n div4[0].style.margin = '40px auto';\n div4[0].style.size = '40';\n \n // add button\n var div3 = $('<div/>');\n var button = document.createElement(\"BUTTON\");\n var b = document.createTextNode(\"Home\")\n button.appendChild(b);\n button.addEventListener(\"click\", doIT.bind(null, param));\n div3.append(button);\n \n //add to toolbar when it's available\n var addToToolbarTimer;\n \n function addToToolbar() {\n var toolbar = $('.md-toolbar-tools');\n \n if(!toolbar.length) return;\n \n toolbar.append(div4);\n //toolbar.append(div1);\n toolbar.append(div3);\n toolbar.append(div2)\n clearInterval(addToToolbarTimer);\n }\n addToToolbarTimer = setInterval(addToToolbar, 100);\n \n function doIT(m){\n theScope.send(m);\n }\n });\n \n</script>","storeOutMessages":false,"fwdInMessages":true,"templateScope":"local","x":490,"y":1270,"wires":[["db91e661.418798"]]},{"id":"db91e661.418798","type":"debug","z":"d01d2553.fd9838","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":660,"y":1270,"wires":[]},{"id":"cac67f0e.f01fa","type":"ui_group","z":"","name":"Button Top","tab":"95753136.fcd6d","disp":true,"width":"6","collapse":false},{"id":"95753136.fcd6d","type":"ui_tab","z":"","name":"Button tab","icon":"dashboard","order":1}]