Replace Dashboard button with uibuilder button

From the help for the Dashboard button:

If set to pass through mode a message arriving on the input will act like pressing the button. The output payload will be as defined in the node configuration.

So unless you've added a Dashboard Template node with a script that does processing of the Dashboard button in the front-end (e.g. the users browser), you don't need to do anything other than connect the output of uibuilder to whatever your Dashboard button is connected to.

Add this to the methods section of your uibuilder index.js:

        sendMe: function() {
            uibuilder.send({topic:'sentFromUibuilder',payload:'BUTTONPRESSED'})
        },

and this to index.html:

<b-button pill variant="secondary" v-on:click="sendMe">Send Me</b-button>

Here is the example flow:

[{"id":"903c5b81.6c3188","type":"inject","z":"18cb249f.38bafb","name":"","topic":"TESTING-UIB","payload":"{\"fan_kleine_kamer\":{\"onoff\":\"off\",\"value\":\"Off\"}}","payloadType":"json","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":190,"y":580,"wires":[["963f6e2c.6d318"]]},{"id":"1002cdc9.9a0522","type":"debug","z":"18cb249f.38bafb","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":670,"y":560,"wires":[]},{"id":"963f6e2c.6d318","type":"uibuilder","z":"18cb249f.38bafb","name":"uib1","topic":"","url":"uib","fwdInMessages":false,"allowScripts":false,"allowStyles":true,"copyIndex":true,"showfolder":false,"x":510,"y":580,"wires":[["1002cdc9.9a0522","b2f1eaa2.6a0d18"],["33d6816c.a2ecde"]]},{"id":"33d6816c.a2ecde","type":"debug","z":"18cb249f.38bafb","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":670,"y":600,"wires":[]},{"id":"6e0aeacb.f85b34","type":"link in","z":"18cb249f.38bafb","name":"uib","links":["338fe20e.adb5ce"],"x":335,"y":540,"wires":[["963f6e2c.6d318"]]},{"id":"c5a714c6.580c98","type":"ui_button","z":"18cb249f.38bafb","name":"","group":"291887c4.c02358","order":3,"width":0,"height":0,"passthru":false,"label":"Test","tooltip":"","color":"","bgcolor":"","icon":"","payload":"BUTTONPRESSED","payloadType":"str","topic":"SentFromDashboardButton","x":810,"y":520,"wires":[["b2f1eaa2.6a0d18"]]},{"id":"b2f1eaa2.6a0d18","type":"debug","z":"18cb249f.38bafb","name":"DO SOMETHING CRAZY","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1010,"y":560,"wires":[]},{"id":"291887c4.c02358","type":"ui_group","z":"","name":"Default","tab":"408c6142.3e537","disp":true,"width":"6","collapse":false},{"id":"408c6142.3e537","type":"ui_tab","z":"","name":"TEST","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

And here is the output:

image