Get an average number from old data

I have a couple of temperature sensors and I would like to see the average value of the individual sensors starting from two months ago to now.

I figured out how to get an average value from a sensor but I can only see the values since I created the helper, is there a way to include the data from the past as well?

Thanks

You can query the database with this:

How far back does your data state go?

It’s only 10 days by default.

I didn’t know it was only 10 days, I guess it’s not so important to get the data anymore.
For now I’ll configure some helpers to average the temperature and start looking at a way to save the data for longer.