You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm trying to calculate monthly average of electricity spot price, which changes every hour. With following arguments it should work nicely:
start: "{{ now().replace(day=1).replace(hour=0).replace(minute=0).replace(second=0) }}"
end: "{{ now() }}"
However, my recorder purge_keep_days is the default 10 days, and increasing that to 31 days would explode the database size. So it means the sensor which I'm calculating monthly average, only contains last 10 days worth of data.
As my goal is to calculate average for full month, result starts to fail after day 11.
Describe the solution you'd like
As the sensor from which I'm counting the average has state_class: measurement, it has the long-term statistics. So I can see the sensor history for the full month. However it seems that average does not count for long-term history measurements.
So can it be enhanced to calculate average also using long-term statistics data?
Describe alternatives you've considered
Alternative obviously is extending recorder purge_keep_days to 31, but despite recorder exclusions and purge automation for largest sensors, it would still increase my recorder db size dramatically.
Additional context
The text was updated successfully, but these errors were encountered:
Checklist
Is your feature request related to a problem? Please describe.
I'm trying to calculate monthly average of electricity spot price, which changes every hour. With following arguments it should work nicely:
start: "{{ now().replace(day=1).replace(hour=0).replace(minute=0).replace(second=0) }}"
end: "{{ now() }}"
However, my recorder purge_keep_days is the default 10 days, and increasing that to 31 days would explode the database size. So it means the sensor which I'm calculating monthly average, only contains last 10 days worth of data.
As my goal is to calculate average for full month, result starts to fail after day 11.
Describe the solution you'd like
As the sensor from which I'm counting the average has state_class: measurement, it has the long-term statistics. So I can see the sensor history for the full month. However it seems that average does not count for long-term history measurements.
So can it be enhanced to calculate average also using long-term statistics data?
Describe alternatives you've considered
Alternative obviously is extending recorder purge_keep_days to 31, but despite recorder exclusions and purge automation for largest sensors, it would still increase my recorder db size dramatically.
Additional context
The text was updated successfully, but these errors were encountered: