Colour and icon to piston state expression?


#1

Hi,

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”
image

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?


#2

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

image


#3

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


#4

I think I got it.


#5

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}]”

image

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.