Labelcolor shows no effect

Hello everybody,

i have a sitemap item like this:

Text item=rasi_status label="Status: [%s]" icon="lawnmower" labelcolor=[rasi_status_code==MOWING="green",rasi_status_code==CHARGING="green",rasi_status_code==RETURNING_TO_DOCKING_STATION="yellow",rasi_status_code=="IMOW®_IS_STUCK"="red",rasi_status_code==BATTERY_FAULT="red"] valuecolor=[rasi_status_code==MOWING="green",rasi_status_code==CHARGING="green",rasi_status_code==RETURNING_TO_DOCKING_STATION="yellow",rasi_status_code=="IMOW®_IS_STUCK"="red",rasi_status_code==BATTERY_FAULT="red"] {
[other stuff]
}

So i would expect the color to change, depending on the contents of rasi_status_code - but it stays black, in the Android App as well as in Basic UI.
grafik

I did check the contents of rasi_status_code and it looks as expected. Obiously i’m missing something?

This is a working example (BasicUI and Android App) how I am using labelcolor:


Text item=WLANPresence labelcolor=[ON="green",OFF="red"]

grafik

Look at events.log what is the real state of your item. I guess there is a difference with the values you use in sitemap.

You forgot double quotes around your values. It sould be item==“value”=“color”

You were right, the old ugly leading/trailing spaces problem. Thanks for the hint in the right direction!