[SOLVED] Using LastUpdate for sitemap Item color property

I just want to change items color in sitemap if they was update long times ago. For example if item updated more than 100 min ago i want to set gray color.
I use in sitemaps this variant:

Text item=Bath_Tmp label="Температура в ванной [%.2f °C]" icon="temperature"        valuecolor=[Bath_Last_Upd=="Uninitialized"="gray",Bath_Last_Upd>100="gray"]	

and this rule:

rule "Records last lodge update time"
when
  Item Bath_Humi  received update or  Item Bath_Humi   received update 
then
  postUpdate(Bath_Last_Upd, new DateTimeType())
end

I found somwhere this example,but i am not sure this is correct and work: Bath_Last_Upd>100=“gray”/

Not going to work like that, Item will have a state like 2018-01-03T11:36:40.000+0100

I’d do it with a second Switch type Item instead. Install expire binding and configure this Item to expire to OFF after 100 mins. Modify your rule to update Switch Item ON when bath Item updated. Look for Switch on or off to do your valuecolor.

Thank you very much! I will try this.
UPD: It’s works. Realy nice solution!

I have a some sensors that not online every time and i just want if some time (1 hour for example) no new data received the linked item become NULL or UNDEF. This is i want to see data in charts. If i have no new data and no data in chart. Now in chart i see horisontal line with last value.

The OH persistence services do not store NULL or UNDEF, so there will be no data to chart.

You might be able to chart differently to show up gaps in data, depending what charting tool you are using. Bar chart, perhaps.

You might use a non-openHAB data store for charting.

Or, you might force a known false vale to your charted Item - zero or -99 or something.

Thank you.
Now i use in sitemaps this method:
Chart item=Temperature_Chart period=D service=“rrd4j” refresh=30000 visibility=[Weather_Chart_Period==1]and my chart is:

For store i use rrd4j persistence.
Can i use another chert tool in sitemaps? Is it possible? Please advise some tool for my situation.

Alternative tool most commonly used is Grafana. Plenty of postings about that.

I do not know how you would set it up to highlight missing data when there is no data recorded, maybe a Grafana user will comment.

Don’t forget that rrd4j compresses older data. Any “gaps” in data will likely be hidden in yesterday’s and older data.