Sitemap valuecolor expression for NULL item

I want to add a valuecolor expression in the sitemap for when the DateTime item is NULL. This is not working, nor empty string “”, nor “Undefined”. The result is black, so no value rules matched.

  1. Is there a way?
  2. Is there a way to set default color in case no rules match?
Number Battery_FrontDoor        "Front Door [%s%%]"        <battery> (gBattery)
DateTime Battery_FrontDoor_Time        "Front Door Last updated [%1$tY-%1$tm-%1$td %1$tT]"     <clock>             (gBatteryLastUpdate)
Default item=Battery_FrontDoor valuecolor=[Battery_FrontDoor_Time>180000="#cc6666", Battery_FrontDoor_Time==NULL="#666666", <=30="#cc6666", Battery_FrontDoor_Time<=180000="#66cc66"]
		Text item=testtimeA valuecolor=[testtimeA==NULL="red"]
		Text item=testOther valuecolor=[testtimeA==NULL="red"]

Works for me. Of course, there isn’t much to see should the ‘main’ Item be NULL too, because sitemap based UIs render NULL as “-”, so you just get a red dash -
labelcolor= is more eye catching.

There is a default, black :wink:
valuecolor=[99="red","blue"]
is acceptable sitemap syntax, but BasicUI at least does not render it.

1 Like

Thanks. I don’t know how I missed it, but it works as you said and as it should. Here is my final version, label colored by last updated and value colored by value.

It would be nice if default color worked in Basic UI.

Default item=Battery_FrontDoor labelcolor=[Battery_FrontDoor_Time==NULL="#ff0000", Battery_FrontDoor_Time>180000="#cc6666", Battery_FrontDoor_Time<=180000="#33cc33"] valuecolor=[<=30="#cc3333",>=60="#33cc33"]
1 Like

We can but ask - but don’t hold your breath.