[SOLVED] Jython, timestamp of minimum value (minimumSince)


with DSL i could get the timestamp of the minimum value (of a range) as follows


timestampEpoch = (LaCrosseTemperatureSensor5_Temperatur.minimumSince(parse("2020-01-01")).timestamp.time as Number).longValue
MyDateTimeTypeFromEpoch = new DateTimeType(new DateTime(timestampEpoch).toString)

how can i do that with jython?
I can already determine the minimum value as follows


MinValueCurYear = PersistenceExtensions.minimumSince(ir.getItem("LaCrosseTemperatureSensor5_Temperatur"), DateTime(2020, 1, 1, 0, 0, 0, 0)).state

Thank you!

you tried with ...)).timestamp ?

Thank you, I have not considered the most obvious! :blush:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.