# Node Red: A widget based dashboard working with Homey trough MQTT

**URL:** <https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798>\
**Category:** Apps\
**Created:** [October 3, 2019, 10:05am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798 "2019-10-03T10:05:10Z")\
**Posts on this page:** 1\
**Showing post:** 287

<div class="post-metadata">

**Author:** ![Keverjeroen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/keverjeroen/32/369_2.png) [@Keverjeroen](https://community.homey.app/u/Keverjeroen)\
**Post date:** [January 26, 2020, 1:50pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/287 "2020-01-26T13:50:58Z")

</div>

I’ve used the msg.ui\_control now to thange the icon of a button. With msg.ui\_control you can change almost everything in the dashboard.

```
var color;

if(msg.payload <= 15){
// It is cold (lets make button blue and set icon)
 color = "#1848DC"
 msg.ui_control = {icon:"wi-wu-chancesnow", tooltip:"Het is koud"};
}
else if(msg.payload <= 21){
// It is normal (lets make button orange and set icon)
 color = "#FF6813"
 msg.ui_control = {icon:"wi-wu-cloudy", tooltip:"Lekker warm"};
}
else{
    // It is hot (lets make button red and set icon)
 color = "#ff1b13"
 msg.ui_control = {icon:"wi-wu-mostlysunny", tooltip:"Het is heet"};
}
msg.background = color;
return [msg];

```

Here you’ll find more info: [https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md](https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md)

---

_[View the full topic](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798)._
