for my blindcontrols I would like to know the lowest temperature of the last night.
my Item is a UoM formatted item and I can´t figure out the correct syntax combined with minimumSince:
tried to move the bracket to: logInfo("test", "minumum Temp: ", Temperature_outside.minimumSince(now.minusHours(24)) as QuantityType<Temperature>.intValue)
Rule ’ test’: Could not cast org.openhab.core.persistence.internal.QueryablePersistenceServiceDelegate$1@17fc1c9 to void; line 9, column 51, length 77
See the docs, this returns an historicState object, you should at least convert to string for printing Temperature_outside.minimumSince(now.minusHours(24)).toString
It’s going to give you a simple number in the .state part, persistence service does not (yet) handle UoM
minimumSince requires .state
averageSince fails with .state
So, a persistence extension that returns a historicItem needs the .state syntax. a persistence extension that returns something else (eg a calculation like average or delta) does not need .state
ok, the docs tell which extensions do return a historicItem and also note that:
The most useful methods of the HistoricItem object returned by some queries, are .state and .getTimestamp
btw. Temperature_outside1.minimumSince(now.minusHours(24)).toString fails too, it has to be .state.toString