Best approach for energy consumption usage - Queries?

This issue is relevant to this discussion.

What is this timeseries stuff which comes in 4.1? A virtual persistence item what you can fill in a rule?
e.g.
virtualPersistenceItem = [ {“22.11.2023 21:50:00”, 32001}, {“23.11.2023 21:55:00”, 32005} ] ?

Pretty close: https://github.com/openhab/openhab-core/pull/3597. Its a new thing to work with forecast, but as far I understand it is not limited only to that.

I failed adding decades (because it would require a lot of changes through out several components as decades isn’t something that is not supported by the underlying libraries) but I have added 3Y, 5Y and 10Y for the initial range of a dynamic period.
See

Hope that helps a bit.

The change has been merged: see Extend chart periods to 3Y, 5Y and 10Y

This is what I was afraid of, but thanks for your efforts!

It seems that there will be a new InMemoryPersistenceService, this would be very very helpful.
I’m not 100% sure, but I think in the future functions like myItem.store(ZonedDateTime,State) can be used in rules for persistence items.