Can't change the button properties (bgcolor, label, etc.)

I've recently started creating my first flow and I've hit a problem. Basically what I want to do is to change the bg color of a button. I wanted to do it using the msg.ui_control, but when I attempted to do so it wouldn't work.

I've created a simple flow to recreate the problem:

[{"id":"ac95c9f4.899c48","type":"ui_button","z":"e152864.d557c78","name":"","group":"c15f4537.459f28","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"Green","icon":"","payload":"","payloadType":"str","topic":"","x":610,"y":200,"wires":[[]]},{"id":"13f4b7a2.5a1828","type":"inject","z":"e152864.d557c78","name":"Red","topic":"","payload":"{\"bgcolor\":\"Red\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":200,"wires":[["562d6254.c9b78c"]]},{"id":"562d6254.c9b78c","type":"change","z":"e152864.d557c78","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"ui_control","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":200,"wires":[["ac95c9f4.899c48"]]},{"id":"6d51a19b.96029","type":"inject","z":"e152864.d557c78","name":"#FF0000","topic":"","payload":"{\"bgcolor\":\"#FF0000\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":240,"wires":[["562d6254.c9b78c"]]},{"id":"8901e7a1.808b48","type":"inject","z":"e152864.d557c78","name":"#ff0000","topic":"","payload":"{\"bgcolor\":\"#ff0000\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":280,"wires":[["562d6254.c9b78c"]]},{"id":"c15f4537.459f28","type":"ui_group","z":"","name":"Group","tab":"9cc02838.aaeca8","order":1,"disp":false,"width":"6","collapse":false},{"id":"9cc02838.aaeca8","type":"ui_tab","z":"","name":"Test","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

It's probably a dummy mistake I made, but if you know the solution to this problem, please respond.

Best Regards,
Fufs

Did you read the info panel ?

Allows dynamic control of the Dashboard.
The default function is to change the currently displayed tab. msg.payload should either be an object of the form {"tab":"my_tab_name"} , or just be the tab name or numeric index (from 0) of the tab or link to be displayed.
Sending a blank tab name "" will refresh the current page. You can also send "+1" for next tab and "-1" for previous tab.

Search: "Change button background color" as we see this question here every week.

Hi @FufsowyFufs, welcome to the forum.

You'll find the folk here very helpful but we really appreciate a good topic and correctly formatted code.

When you post code or a flow please put three back ticks on a line above and below, like this...
```
code here
```

Secondly, a more appropriate topic title really helps the right forum member understand if they can help. For example, this topic should probably be titled "can't change button background colour".

Anyhow, a quick search lead to this. Might be helpful?

1 Like

Hi,
Sorry, I was really frustrated with it. I read the config-fields.md file on Github and thought this was the way to go. When I tried to research the problem, I was looking for ui_control information. Now I see I was mistaken. Thanks for the help. I'm gonna change the post now to help others find the problem. Appreciate the help.

Best Regards,
Fufs