UPD: Average Temperature sensor is now deprecated. Use Average sensor instead: https://github.com/Limych/ha-average
This sensor allows you to calculate the average temperature for one or more sensors over a specified period. Or just the average current temperature for one or more sensors, if you do not need historical data.
What makes this sensor different from others built into HA:
Compare with the min-max sensor.
This sensor in the mean mode produces exactly the same average value from several sensors. But, unlike our sensor, it cannot receive the current temperature data from a weather, climate and water heater entities.
Compare with statistics sensor.
This sensor copes with the averaging of data over a certain period of time. However… 1) it cannot work with several sources at once (and can’t receive temperature from weather, climate and water heater entities, like min-max sensor), 2) when calculating the average, it does not take into account how much time the temperature value was kept, 3) it has a limit on the number of values it averages - if by chance there are more values, they will be dropped.