History page searching in long term statistics tab when outside state range

It would be great if the history page automatically searched in the long term statistics table when the search parameters are outside the state database table range.

So when i search on the history page for my outside temperature and put in the dates from last year it will show me the min / mean / max data in the graph for that period for the specified entity.

This would be very helpful for databases that purge the states table every 5 days but do store long term statistics for that entity.

There is not really a stock way to search for data in the long term statistics database at the moment except adding a statistics graphcard in lovelace and put the parameters to days and put in 365 days or more to see the measured data from last year. (if im wrong please correct me)