How to get the average max value of a sensor

I have tried the average sensor, statistics sensor, but nothing is giving me the number.

My goal is to have a way to get the Max temp each day, for 14 days, but then take the average of that number.

Everything I have tried will only AVERAGE the min/max.
Looking for a way to get the average of the MAX.

So this is what I am trying.
using statistics to get the max temp each day (measurement is 1 day).

then I am using an average sensor, to take each of those measurements, over 14 days, to get the average fo the max.

Not sure if this will work like I want it, but we will see tomorrow when I get new data.

sensor:
  - platform: average
    name: 'Average Max Pool Temp'
    duration:
      days: 14
    entities:
      - sensor.max_pool_temps_14_days    
      
  - platform: statistics
    name: "Max Pool Temps"
    entity_id: sensor.pool_temp
    state_characteristic: value_max
    max_age:
      days: 1

Have you looked at min/max.

Also I am not aware of the platform “average” I think that should be statistics. I get an integration error when I try to use average.

Average may have come from HACS

I tried min/Max, but from the documentation it requires at least TWO sensors.
I am working with just one.

entity_ids list | string REQUIRED
At least two entities to monitor. The unit of measurement of the first entry will be the one that’s used. All entities must use the same unit of measurement.

Use statistics for example


  - platform: statistics
    name: Wind5minGustStatistics
    entity_id: sensor.wind_3s_base
    state_characteristic: value_max
    sampling_size: 999
    precision: 1
    max_age:
        minutes: 5

Edit: i see you are using statistics already. I then run a template to do next calculation

ok, I have seen “template” thrown around in other posts where I was searching for an answer.

How would you use a template?

Here is what I have right now.
My thought was I would use statistics as a way to get the MAX temp each day (thus the max_age as 1)
I would then use the average sensor to get hte average of the statistics sensor.

sensor:
  - platform: average
    name: 'Average Max Pool Temp'
    duration:
      days: 14
    entities:
      - sensor.max_pool_temps    
      
  - platform: statistics
    name: "Max Pool Temps"
    entity_id: sensor.pool_temp
    state_characteristic: value_max
    max_age:
      days: 1

Here is what the history looks like so this is not working either :frowning:

Looks like the Average sensor is not doing what I though it would do.