Showing average sensor value for time of day

Hi! I have problem to which I just haven’t found a solution yet.

I’d like to show a graph with two values:

  • The value of a specific sensor over the past 24 hours
  • The average value of the sensor for that time of day for the past 7 days (or as long as I have statistics for it in the recorder.

The first one is easy, I just haven’t found a solution for the second one. So for example at 10am I’d like to show the average this sensor was at, in the past 7 days at 10am.
I’ve found ways to show the average over the past hour or day or so, but not based on the time of day, independant of the date.

I usually use apexcharts for my graphing-needs, but am open for alternatives. :slight_smile:

I would probably look at a sql sensor for this. Enable the integration and you can write sql that will query the stats table to give you this value.

I too use apexcharts, and it can pull statistics and show the mean over an hour, day or month. This might be enough for you, but it seemed like a good idea so I raised a feature request to be able to get 7 days or 3 months, etc. If you add your support to it, maybe it will become a reality.

Thanks! Took a bit but I managed to make an SQL sensor for it. Thanks for pointing me in the right direction!