Hi i am using OH2 on Win10.
I Wold like to have an Item with Value Max. Temperature of the day and as Label the Date and Time of this Value.
This is my Code:
Item
Number Aquara_Temp_Wz_Max "Wz.MAX.Temp [%.1f °C]"
Sitemap
Text item=Aquara_Temp_Wz_Max icon="temperature"
Rule
rule "Test"
when
Time cron "0/2 * * ? * * *"
then
val maxWz = Aquara_Temp_Wz.maximumSince(now.withTimeAtStartOfDay).state as DecimalType
Aquara_Temp_Wz_Max.label= Aquara_Temp_Wz.maximumSince(now.withTimeAtStartOfDay).timestamp.toString
Aquara_Temp_Wz.maximumSince(now.withTimeAtStartOfDay).state as DecimalType
end
The Rule is working and my Item gets the Max.Temp. Value and The Label with the Timestamp ->
Mon Mar 04 10:08:09 CET 2019.
How cam i format this Timestamp in different way?
Thanks for any advice