WTH there are different integrations to setup basic statistics operations

Hi,

I was wondering recently, that if I had to explain how to setup a ‘mean’ sensor in home assistant to someone, it would be a bit challenging to decide why there is Min/Max - Home Assistant (which through gui, although not in the documentation, supports min/max/mean/median/latest) and Statistics - Home Assistant (yaml only?) and, although with some discussion Filter - Home Assistant .

Three different integrations, with three different configuration options that enable to define ‘mean’ values.

Right now the work of thought is:

  1. you want a mean value of UNKNOWN number of samples, use the min/max/mean sensor.
  2. ah, you want to actually know and control the number of sample that will be used, then use the /statistics sensor,
  3. ah ah, you say your samples are not evenly spaced and the fact that during the day you receive more samples although during the night you only receive one but is valid for the whole night (example, indoor temperatures), then you need the /filter sensor.

Why not simplify all inside the statistics.

Not what that integration is for.

It returns the min / max value of multiple sensors. e.g. which temperature sensor is the hottest?

The statistics sensor returns statistics about a single sensor’s state history. e.g. what is the maximum value of the outdoor temperature today?

Two seperate integrations that do two different things.

But wouldn’t it make sense to combine both?, so that then both a “wich sensor is the hottest”, “what was the hottest value today” would also enable “wich sensor WAS the hottest today” (as in a table of m sensors x n samples each sensor).