Colour and icon to piston state expression?



I’m trying to add icon, colour and variable to be used in piston state.
How should I write it?
This is what I now have:
“[red|:fas fa-map-marker: test”

Location icon is black and I would like it to be red.

Also if I want to add variable which is used in piston…how should I add it to that expression?


just missing the closing bracket
“[red|:fas fa-map-marker: test]”



But what if test is variable. Then it says variable test" not found. There seems to be missing something after closing bracket is added.


I think I got it.


use curly brackets to encapsulate only the variable name, example below. I set a string variable named test, with a value of it worked

“[red|:fas fa-map-marker: {test}]”


the [] for formatting must contain all elements inside quotes…this ultimately converts everything to a string…to re-introduce a variable, you must use the {} around the variable name.