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