Have been using colors to indicate if temp readings are being updated for a number of years. After the update to OH2.2 however this stopped working and all of my readings stay “green”. Did something regarding valuecolor change in OH2.2?
itemfile:
Number BU_Terras_Sensor2_TEMP_Raw { channel="rfxcom:temperaturehumidity:rfxcom_bridge:1:temperature" }
sitemap:
Text item=BU_Terras_Sensor2_TEMP valuecolor=[BU_Terras_Sensor2_Update=="NULL"="red",BU_Terras_Sensor2_Update>300="red",BU_Terras_Sensor2_Update>150="orange",BU_Terras_Sensor2_Update<=150="green"]
rulefile:
rule "BU_Terras_Sensor2"
when
Item BU_Terras_Sensor2_TEMP_Raw received update or
Item BU_Terras_Sensor2_TEMP_Raw received update
then
postUpdate(BU_Terras_Sensor2_TEMP, (BU_Terras_Sensor2_TEMP_Raw.state as DecimalType) + 0)
postUpdate(BU_Terras_Sensor2_HUM, (BU_Terras_Sensor2_HUM_Raw.state as DecimalType) + 0)
postUpdate(BU_Terras_Sensor2_BATT, (BU_Terras_Sensor2_BATT_Raw.state as DecimalType) * 1)
postUpdate(BU_Terras_Sensor2_SIGN, (BU_Terras_Sensor2_SIGN_Raw.state as DecimalType) * 25)
BU_Terras_Sensor2_Update.postUpdate( new DateTimeType() )
end
I can see values coming in, i see timestamps change but if updates stop I do not get orange or red indicators?
I will try to reproduce your problem in Basic UI, we have a very similar case in the demo sitemap.
I know something was recently changed with datetime.
I can confirm the problem when using DateTime diff in sitemap attributes like valuecolor.
Diff computation with “now” was done in the wrong way !
I just proposed a fix: https://github.com/eclipse/smarthome/pull/4827
I’m not knowledgeable enough to understand the whole process from pull request to distribution, but this problem still exists on the latest version, correct? Seems like that in my case at least. I can see the PR was merged to master Jan 5th, any idea when this will find its way to my Pi?