Sitemap labelcolor+valuecolor

Hello everybody,

I use Openhab 2.4 on a Raspi 3+. I tried to set a color with valuecolor in the sitemap at a string item depending on the value. It works when I use numbers (e.g. 0:00:00) but not for running/standby.
Does anyone have an idea or definition of a string item where this works?
Thanks in advance.

    String VibSys_ETS10_3      "Status [%s]"                    (gKabine) { http="<[http://192.168.10.122:8080/static/Vib-Sys_ETS-10.sid:5000:REGEX(.*Status=(.*)\\n.*\\n.*\\n.*)]" }

Text item=VibSys_ETS10_3 labelcolor=[standby="blue" , running="yellow"] valuecolor=[standby="green", running="red"]

This I tried also:

Text item=VibSys_ETS10_3 labelcolor=["standby"="blue" , "running"="yellow"] valuecolor=["standby"="green", "running"="red"]

I can only guess, but:

Text item=VibSys_ETS10_3 labelcolor=[=="standby"="blue" , =="running"="yellow"] valuecolor=[=="standby"="green ", =="running"="red"]

Thanks Jürgen for your answer. This I tried also but with the same result, the value is white. I have no idea.

You have to use value of the underlying item (NOT the translated value).

Hi Konstantin,

I use the item value, there is no mapping.

thanks anyway

So “standby” and “running” coming from item? When you do a text item is this what displayed? I’ll play with my own binding later tonight, it does return similar thing, I’ll let you know.

yes, it is.

Here an example for one item:
String Vib_Sys_ETS_40_3 “Status [%s]” (gKabine) { http="<[http://xxx.xxx.xxx.xxx:8080/static/D_VibSys_LDS_V82_2.txt:5000:REGEX(.Status=(.)\n.\n.\n.\n.\n.*)]" }

Thanks

What you are interested in is the state of the Item, which is not visible in its definition.
Something like an events.log entry showing the Item change would be useful there.