[Solved]How to change dashboard switch icon from flow?

Hi!
I want to change switch icon from flow, I tried the following:
I have set icon to "custom" in switch properties and I have filled "on icon" field with {{icon}} and matching color with {{color}}.

In a function just before the switch, I have set the variables:

msg.icon = "battery_alert";  
msg.color = "RED";

The button icon does not work, it is replace by a question mark.
but If I copy paste directly "battery_alert" & red in switch properties, it works...
How can I do ?

Dashboard widgets can be customized by sending supported configurable options using msg.ui_control
See documentation https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md
for ui_switch node it goes like this
msg.ui_control = {onicon:"fa-fire",oncolor:"orange",officon:"fa-fire",offcolor:"yellow"}

Works perfectly! thank you !!