Hello,
i’ve got the following problem. I’m calculation the Item “Wasserstand” within a rule. When I look at my event.log I see that the value has been refreshed.
2019-09-01 09:22:00.965 [vent.ItemStateChangedEvent] - Wasserstand changed from 192 to 193
But I can’t display it at my sitemap. Whats wrong with my code? The value is empty in my sitemap. Depth and ZTime is shown.
Item:
Number Depth “Depth” (gRTL) {channel=“mqtt:topic:brokerhome:sensoren:Depth”}
String ZTime “ZTime” (gRTL) { channel=“mqtt:topic:brokerhome:sensoren:ZTime”}
Number Wasserstand “Wassserstand in cm” (gRTL)
Rule:
rule “BerechneWasserstand”
when
Item Depth received update or Time cron “0 */5 * * * ?”
then
Wasserstand.postUpdate(257-(Depth.state as DecimalType))
end
Sitemap:
Frame label=“Zisterne” {
Text item=Wasserstand label=“Wasserstand in cm” icon=“flow”
Text item=Depth label=“Abstand zum Wasser in cm” icon=“flow”
Text item=ZTime label=“Zeit” icon=“clock”
}
}