Is there a way to get a report of the average temperature in a day based on the temperature readings of a sensor and then to get daily historical data of that average? For instance, if the sensor reported 10 different temperature readings within 24 hours I would like to be able to get the total of the 10 readings from within a days period then divide that by 10 to get the average. Then I would like to be able to get daily historical data of that average.
I just implemented this platform: sql example and the Average Sensor Since 24 hours haven’t passed I don’t know what they will do after the 24 hours have passed. Does anyone know if I can use either of those to then get a daily record of the daily average or do I need yet a different solution to get what I need?
The Min/Max integration only does an average of two sensors and not an individual sensor which is why I never used that one.
That is the Average Sensor that I had mentioned in my post. What I don’t know is if that will allow me to get daily historical data of that average in HA. Is that what it will do?
the average sensor will give you a rolling 24 hour average if you set it up that way. e.g. if it’s 8am now, you’ll get an average from 8am yesterday to 8am today.
If you want to have a static midnight to midnight only, you’ll need to use the sql look up.
I am having trouble understanding if I use the following example as a guide as to whether or not I will get the daily avg and also historical data of the daily average. Do you have an idea?
# Example configuration.yaml entry
sensor:
- platform: average
name: 'Average Temperature'
duration:
days: 1
entities:
- sensor.gismeteo_temperature
You won’t - it will give you the last 24 hours. The docs for that component show (with an example) exactly how to set midnight as the start time.
It’s maybe not going to give you historic information easily as you want though.
I was finally able to get what I wanted using the platform: sql example, InfluxDB, and Grafana. I had to setup Grafana with field value last since the last value has the average for the whole day, group by 24h or 1d, add tz as Country/City so that the time started at 00:00, then change visualization to Bars under Draw Mode. In order to get the color changed to the HA theme I used the hex color code from HA and put it in add series override.
I verified that the average was accurate by placing the temperature sensor in different temperature extremes for each day of 3 different days and I could see an immediate change as soon as a new day started even if I had moved the sensor prior to the start of the new day.
Hi, i would like show average senosr for PV power wich start on sunrise and end on sunset every day. Unfortunately i cant set Start: and End: right. Can anyone here help me pls?
Many thanks
The problem is the next_rising or next_setting events are always in the future. You’ll need to get the custom integration sun2 to get todays rising and setting.