Additional time based statistics

At the moment we can get a minimum, maximum or a mean for a value. I would like the ability to use statistics based on time information. To start I think the following information would be usefull:

  1. earliest and latest time that a value went positive or negative during the day
  2. Earliest and latest time at which a value increased or decreased during a day. (e.g. first increase 09:20, last decrease 12:00)
  3. number of minutes or hours or days a value remained at a particular value (this may be 0 and or 100% or a settable value to limit data storage issues)
  4. Longest or shortest duration a value was held (e.g. value was static for 8 hours)
  5. minimum and maximum rate of change for increasing and decreasing each day ( 10 per hour or 80 per minute)

I know these are more data points for a value, but they are exceptionally handy over long time frames to see if there is degradation in battery performance, solar output, fuel usage and other usage patterns.

Thank you for having a look at my suggestion.