How is PersistenceExtensions.evolutionRate calculated? Lacking Documentation

The documentation says absolutely nothing of which units are assumed, timespan, or other relevant info, making it pure guesswork what this number is. Is it relative to min, or historic, or average, or running average…? How is it different from deltaSince?

<item>.evolutionRate(ZonedDateTime)	Gets the evolution rate of the state of a given Item since a certain point in time (returns DecimalType)

When the documentation says “evolutionRate: Gets the evolution rate …”, then the doc says nothing more than the code itself, and is thereby useless as far as I as a user, who has not read the code, is concerned. A useful doc would explain what this is or how it’s calculated, since this is not of any common knowledge.

I didn’t manage to find the code to find out myself.

Could someone explain?
Perhaps adjust the Doc too, for future users?


The code is here: openhab-core/ at main · openhab/openhab-core · GitHub

The documentation is here: openhab-docs/ at main · openhab/openhab-docs · GitHub

You can improve the documentation with the online editor.

1 Like

Looking at the code that @J-N-K mentioned it documents the evolution rate as

// ((now - then) / then) * 100

which means that it takes the delta from the current and the previous item and relates that to the previous item and then provides that as a percentage. This is how I understand it.

Does that help?