# One button with 2 MQTT topics

**URL:** <https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440>\
**Category:** Dashboard\
**Created:** [20 January 2021 13:28 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440 "2021-01-20T13:28:53Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [20 January 2021 13:28 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/1 "2021-01-20T13:28:54Z")

</div>

Hi All,

Im new with Node RED and i'm trying to create a dashboard to control my home. So far i have been able to do most with the information found on this forum. But i cant figure out how to create one button that sends 2 different mqtt topics, alternating.

Some background information why i need this:  
I have a fireplace that works with an infrared remote. It uses different signals for turning ON and OFF. I have successfully connected an IR hub that can send the ON and OFF signal via mqtt. So the button must send the mqtt topic ON and mqtt topic OFF, alternating each other.

can somebody put me in the right direction?

Thanks in advance,  
Khoi

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [20 January 2021 13:52 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/2 "2021-01-20T13:52:32Z")

</div>

Here is an example using function node and context storage, as button value needs to be stored between presses

```auto
[{"id":"6421eda3.e174a4","type":"ui_button","z":"57675e72.26a0d8","name":"","group":"b055fa85.83d6e","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"button1","payloadType":"flow","topic":"","x":260,"y":1960,"wires":[["b786488b.8bc7a"]]},{"id":"b786488b.8bc7a","type":"function","z":"57675e72.26a0d8","name":"","func":"let button1 = flow.get(\"button1\");\nmsg.payload = button1 === 1 ? 0 : 1;\nflow.set(\"button1\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":1960,"wires":[["c5d88c3.9b074f"]]},{"id":"c5d88c3.9b074f","type":"debug","z":"57675e72.26a0d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":2120,"wires":[]},{"id":"b055fa85.83d6e","type":"ui_group","z":"","name":"Default","tab":"8f03e639.85956","order":1,"disp":true,"width":"6","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 January 2021 14:08 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/3 "2021-01-20T14:08:26Z")

</div>

Have you considered using a ui-switch instead?

---

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [20 January 2021 15:22 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/4 "2021-01-20T15:22:46Z")

</div>

Hi Colin,  
With the ui-switch i can only send 1 topic. eg, homie/homey-topic/fireplaceoff  
but i want this switch to send this topic: homie/homey-topic/fireplaceoff AND homie/homey-topic/fireplaceon, alternating

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [20 January 2021 15:32 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/5 "2021-01-20T15:32:47Z")

</div>

The switch has 2 outputs one for off and one for on. You would then move msg.payload to msg.topic.

```auto
[{"id":"c5d88c3.9b074f","type":"debug","z":"57675e72.26a0d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":2120,"wires":[]},{"id":"b786488b.8bc7a","type":"function","z":"57675e72.26a0d8","name":"","func":"let button1 = flow.get(\"button1\");\nmsg.payload = button1 === \"on\" ? \"off\" : \"on\";\nflow.set(\"button1\", msg.payload);\nmsg.topic = \"homie/homey-topic/fireplace\"+msg.payload\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":1960,"wires":[["c5d88c3.9b074f"]]},{"id":"6421eda3.e174a4","type":"ui_button","z":"57675e72.26a0d8","name":"","group":"b055fa85.83d6e","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"button1","payloadType":"flow","topic":"","x":260,"y":1960,"wires":[["b786488b.8bc7a"]]},{"id":"b623af3a.4d8d88","type":"ui_switch","z":"57675e72.26a0d8","name":"","label":"switch","tooltip":"","group":"b055fa85.83d6e","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"homie/homey-topic/fireplaceon","onvalueType":"str","onicon":"","oncolor":"","offvalue":"homie/homey-topic/fireplaceoff","offvalueType":"str","officon":"","offcolor":"","x":250,"y":2000,"wires":[["c5d88c3.9b074f"]]},{"id":"b055fa85.83d6e","type":"ui_group","z":"","name":"Default","tab":"8f03e639.85956","order":1,"disp":true,"width":"6","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

i added how to construct topic in function node, take a look.

---

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [20 January 2021 15:33 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/6 "2021-01-20T15:33:01Z")

</div>

Hi E1cid,

Im not sure how to use your solution. I can only put one topic eg. _homie/homey-topic/fireplaceon_ in the button node. how can i make it change to a different topic eg. _homie/homey-topic/fireplaceoff_ when pressed

---

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [20 January 2021 15:39 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/7 "2021-01-20T15:39:02Z")

</div>

this code for the button node works, but i'm not sure what the purpose is of the switch node.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [20 January 2021 15:39 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/8 "2021-01-20T15:39:12Z")

</div>

i have added how to construct topic in function node take a look. You do not have to use the topic input in btton node, you can create msg.topic after the button press.

The switch node was there for example of how to get two different outputs, after switch use a change node to move msg.payload to msg.topic.

---

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [20 January 2021 15:44 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/9 "2021-01-20T15:44:13Z")

</div>

Oh i see. The button works perfect!

Is it also possible to use an google mi icon and increase the size of it?  
_mi-whatshot_ works but _mi-2x mi-whatshot_ not.

---

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [20 January 2021 15:54 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/10 "2021-01-20T15:54:00Z")

</div>

@E1cid a complete different problem you probably also know the answer to:  
I currently have the standard lightbulb from font awesome that is yellow when on and black when off, but i would like to use my own custom .png file when a lamp is on and a different .png file when the lamp is off. both files are on the server located.

At the moment i use this switch node

 ![Screen Shot 2021-01-20 at 4.52.57 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/0/d03d7147525a32a1aba45e9d2ce6a75e9c1bb826.png)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [20 January 2021 15:57 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/11 "2021-01-20T15:57:17Z")

</div>

If you have your setup connected to the internet, you can use iconify icons

```auto
[{"id":"c5d88c3.9b074f","type":"debug","z":"11af8890.7bdd97","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":670,"y":1180,"wires":[]},{"id":"b786488b.8bc7a","type":"function","z":"11af8890.7bdd97","name":"","func":"let button1 = flow.get(\"button1\");\nmsg.payload = button1 === \"on\" ? \"off\" : \"on\";\nflow.set(\"button1\", msg.payload);\nmsg.topic = \"homie/homey-topic/fireplace\"+msg.payload\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":1140,"wires":[["c5d88c3.9b074f"]]},{"id":"6421eda3.e174a4","type":"ui_button","z":"11af8890.7bdd97","name":"","group":"b055fa85.83d6e","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"button1","payloadType":"flow","topic":"","x":260,"y":1140,"wires":[["b786488b.8bc7a"]]},{"id":"b623af3a.4d8d88","type":"ui_switch","z":"11af8890.7bdd97","name":"","label":"switch","tooltip":"","group":"b055fa85.83d6e","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"homie/homey-topic/fireplaceon","onvalueType":"str","onicon":"iconify-ic:baseline-local-fire-department","oncolor":"yellow","offvalue":"homie/homey-topic/fireplaceoff","offvalueType":"str","officon":"iconify-ic:baseline-local-fire-department","offcolor":"orange","x":250,"y":1180,"wires":[["c5d88c3.9b074f"]]},{"id":"5269ca05.80f3d4","type":"ui_template","z":"11af8890.7bdd97","group":"d8f1e676.bd2948","name":"allow iconify","order":3,"width":0,"height":0,"format":"<script src=\"https://code.iconify.design/1/1.0.7/iconify.min.js\"></script>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":270,"y":1080,"wires":[[]]},{"id":"b055fa85.83d6e","type":"ui_group","name":"Default","tab":"8f03e639.85956","order":1,"disp":true,"width":"6","collapse":false},{"id":"d8f1e676.bd2948","type":"ui_group","name":"Default","tab":"84350e6b.7f5f3","order":1,"disp":true,"width":"6","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false},{"id":"84350e6b.7f5f3","type":"ui_tab","name":"Away","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [20 January 2021 16:24 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/12 "2021-01-20T16:24:30Z")

</div>

Great this is working!  
Can i also increase the size of the icon?

---

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [20 January 2021 16:25 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/13 "2021-01-20T16:25:41Z")

</div>

Hi E1cid,

I''m trying to make it work with the switch node. I added the change node behind it but it doesnt seems to work. Can you have a look at my code and see what i did wrong?

```auto
[{"id":"8ac9cc28.ef381","type":"ui_button","z":"48518d4f.6375e4","name":"","group":"ddc011ab.654ef","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"button1","payloadType":"flow","topic":"","x":770,"y":360,"wires":[["924dfabf.0070a8"]]},{"id":"924dfabf.0070a8","type":"function","z":"48518d4f.6375e4","name":"","func":"let button1 = flow.get(\"button1\");\nmsg.payload = button1 === \"on\" ? \"off\" : \"on\";\nflow.set(\"button1\", msg.payload);\nmsg.topic = \"homie/homey-topic/fireplace\"+msg.payload\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1010,"y":360,"wires":[["cb97940.21f4c7","6d199caf.958224"]]},{"id":"cb97940.21f4c7","type":"debug","z":"48518d4f.6375e4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1210,"y":400,"wires":[]},{"id":"6d199caf.958224","type":"mqtt out","z":"48518d4f.6375e4","name":"MQTT Transmitter","topic":"","qos":"","retain":"","broker":"d094d3b7.a558a8","x":1210,"y":460,"wires":[]},{"id":"d83370d1.cdf99","type":"change","z":"48518d4f.6375e4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"topic","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":420,"wires":[["6d199caf.958224","cb97940.21f4c7"]]},{"id":"b8232141.96144","type":"ui_switch","z":"48518d4f.6375e4","name":"","label":"","tooltip":"","group":"ddc011ab.654ef","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"homie/homey-topic/fireplaceon","onvalueType":"str","onicon":"iconify-ic:baseline-local-fire-department","oncolor":"yellow","offvalue":"homie/homey-topic/fireplaceoff","offvalueType":"str","officon":"iconify-ic:baseline-local-fire-department","offcolor":"orange","x":770,"y":400,"wires":[["d83370d1.cdf99"]]},{"id":"ddc011ab.654ef","type":"ui_group","name":"Group 1","tab":"bcf02f19.c8136","order":1,"disp":false,"width":15,"collapse":false},{"id":"d094d3b7.a558a8","type":"mqtt-broker","name":"Homey MQTT","broker":"192.168.178.83","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"bcf02f19.c8136","type":"ui_tab","name":"Music","icon":"my_library_music","order":5,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [20 January 2021 16:36 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/14 "2021-01-20T16:36:19Z")

</div>

not able to get iconify to work on my end, but here is it with MD icon

```auto
[{"id":"ec217c2a.a3711","type":"ui_switch","z":"57675e72.26a0d8","name":"","label":"switch","tooltip":"","group":"2e58add5.e83e22","order":2,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"homie/homey-topic/fireplaceon","onvalueType":"str","onicon":"mi-local_fire_department","oncolor":"red","offvalue":"homie/homey-topic/fireplaceoff","offvalueType":"str","officon":"mi-local_fire_department","offcolor":"black","x":80,"y":2380,"wires":[["67d59fe5.1bedb"]]},{"id":"67d59fe5.1bedb","type":"change","z":"57675e72.26a0d8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":2380,"wires":[["1cf192fa.dc719d","ec217c2a.a3711"]]},{"id":"1cf192fa.dc719d","type":"debug","z":"57675e72.26a0d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":540,"y":2360,"wires":[]},{"id":"e7e84458.43c2f","type":"function","z":"57675e72.26a0d8","name":"","func":"let button1 = flow.get(\"button1\");\nmsg.payload = button1 === \"on\" ? \"off\" : \"on\";\nflow.set(\"button1\", msg.payload);\nmsg.buttoncolor = msg.payload ===\"on\" ? \"red\" : \"blacK\";\nmsg.topic = \"homie/homey-topic/fireplace\"+msg.payload\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":310,"y":2320,"wires":[["1cf192fa.dc719d","979d1588.20ee6"]]},{"id":"979d1588.20ee6","type":"ui_button","z":"57675e72.26a0d8","name":"","group":"2e58add5.e83e22","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"{{buttoncolor}}","bgcolor":"","icon":"mi-local_fire_department","payload":"button1","payloadType":"flow","topic":"","x":100,"y":2320,"wires":[["e7e84458.43c2f"]]},{"id":"2e58add5.e83e22","type":"ui_group","name":"Group 1","tab":"a3108c9b.a3cac8","order":1,"disp":false,"width":15,"collapse":false},{"id":"a3108c9b.a3cac8","type":"ui_tab","name":"Music","icon":"my_library_music","order":5,"disabled":false,"hidden":false}]

```

you had payload and topic reversed

---

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [20 January 2021 16:48 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/15 "2021-01-20T16:48:39Z")

</div>

it worked!

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [20 January 2021 17:07 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/16 "2021-01-20T17:07:00Z")

</div>

> [@khoihosi](#):
>
> Can i also increase the size of the icon?

There is many ways to do it and to choose the correct way really depends on too many things 🙂

```auto
[{"id":"ec217c2a.a3711","type":"ui_switch","z":"e8af3254.77f7e","name":"","label":"switch","tooltip":"","group":"2e58add5.e83e22","order":2,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"homie/homey-topic/fireplaceon","onvalueType":"str","onicon":"mi-local_fire_department","oncolor":"red","offvalue":"homie/homey-topic/fireplaceoff","offvalueType":"str","officon":"mi-local_fire_department","offcolor":"black","x":270,"y":340,"wires":[["67d59fe5.1bedb"]]},{"id":"67d59fe5.1bedb","type":"change","z":"e8af3254.77f7e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"topic","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":340,"wires":[["1cf192fa.dc719d","ec217c2a.a3711"]]},{"id":"1cf192fa.dc719d","type":"debug","z":"e8af3254.77f7e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":730,"y":320,"wires":[]},{"id":"e7e84458.43c2f","type":"function","z":"e8af3254.77f7e","name":"","func":"let button1 = flow.get(\"button1\");\nmsg.payload = button1 === \"on\" ? \"off\" : \"on\";\nflow.set(\"button1\", msg.payload);\nmsg.buttoncolor = msg.payload ===\"on\" ? \"red\" : \"blacK\";\nmsg.topic = \"homie/homey-topic/fireplace\"+msg.payload\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":500,"y":280,"wires":[["1cf192fa.dc719d","979d1588.20ee6"]]},{"id":"979d1588.20ee6","type":"ui_button","z":"e8af3254.77f7e","name":"","group":"2e58add5.e83e22","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"{{buttoncolor}}","bgcolor":"","icon":"mi-local_fire_department","payload":"button1","payloadType":"flow","topic":"","x":290,"y":280,"wires":[["e7e84458.43c2f"]]},{"id":"8ca3e4b4.aa6228","type":"ui_template","z":"e8af3254.77f7e","group":"ea1c04a1.f51148","name":"dashboard CSS","order":3,"width":0,"height":0,"format":"<style id=\"dashboard-style-override\">\n /*icon size for switches*/\n .nr-dashboard-switch ui-icon > * i{\n font-size:36px;\n }\n /*icon size for buttons*/\n .nr-dashboard-button i {\n font-size: 36px;\n }\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":360,"y":440,"wires":[[]]},{"id":"2e58add5.e83e22","type":"ui_group","name":"Group 1","tab":"a3108c9b.a3cac8","order":1,"disp":false,"width":6,"collapse":false},{"id":"ea1c04a1.f51148","type":"ui_group","name":"Conexão","tab":"b1ab5f32.33e4d8","order":1,"disp":true,"width":"6","collapse":false},{"id":"a3108c9b.a3cac8","type":"ui_tab","name":"Music","icon":"my_library_music","order":5,"disabled":false,"hidden":false},{"id":"b1ab5f32.33e4d8","type":"ui_tab","name":"triumph","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![khoihosi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@khoihosi](https://discourse.nodered.org/u/khoihosi)\
**Post date:** [21 January 2021 12:41 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/17 "2021-01-21T12:41:18Z")

</div>

Yes this worked. Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 February 2021 12:41 UTC](https://discourse.nodered.org/t/one-button-with-2-mqtt-topics/39440/18 "2021-02-04T12:41:19Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
