[SOLVED] Valuecolor in sitemap

Hello everyone, in sitemap it would be possible to use valuecolor with the status of an Item, example I have an Item temperature_set that can have values between 20 and 23, then I have an Item temperature_min with value temperature_set - 1.5 and temperature_max that is worth temperature_set + 1.5, my intent would be this,

Text item = temperature_vasca valuecolor = [<temperature_min.state = “blue”, <= temeratura_max.state = “green”]

But this does not work, is there a solution?

Thank you

P.S. this is an online translation

I believe there is an open issue regarding color in BasicUI. I don’t know the status but believe this was not working for the 2.2 release.

Here are 2 workarounds:

Number temperature_min "min[%.1f]"
Number temperature_max "max[%.1f]"
Number temperature_vasca "vasca[%.1f]"
Number vc "vc[%s]"
Number dif "dif[%.1f]"
rule "tmp"
    System started

    var i = 0
    if (temperature_vasca.state < temperature_min.state as Number) {i = 1}
    else if (temperature_vasca.state > temperature_max.state as Number) {i = 2}

    dif.postUpdate(temperature_vasca.state as Number - ((temperature_min.state as Number + temperature_max.state as Number) /2))
sitemap tmp label="TMP" {
Text item=temperature_min
Text item=temperature_max
Text item=vc
Text item=temperature_vasca valuecolor=[vc==1="blue", vc==2="red"]
Text item=dif
Text item=temperature_vasca valuecolor=[dif < -1.5 = "blue", dif > 1.5 = "red"]

Yes, it is not possible at my knowledge to compare two items in a valuecolor attribute.

Ok thanks, the solutions work for me.

P.S. this is an online translation