Selecting aggregates over the last x days

Hi there,

I would like to display energy usage averages for different devices in HA. Is there any way to modify the query/select only the last x days and calculate a daily average?

Tobias

Does this help?