mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-04-07 08:03:40 +00:00
Previously all 26 MONETARY sensors had state_class=TOTAL, causing the statistics and statistics_short_term tables to grow unbounded (never auto-purged by HA). Reduced to 3 sensors that genuinely benefit from long-term history: - current_interval_price (main price sensor, trend over weeks/months) - current_interval_price_base (required for Energy Dashboard) - average_price_today (daily avg tracking over seasons) Set state_class=None on 23 sensors where long-term history adds no value: forecast/future sensors (next_avg_*h), daily snapshots (lowest/highest_price_today), tomorrow sensors, rolling windows (trailing/leading 24h), and next/previous interval sensors. Note: state_class=None does not affect the States timeline (History panel). Only the Statistics chart on entity detail pages is removed for the affected sensors. Existing statistics data is retained. Impact: ~88% reduction in statistics table writes. Prevents database bloat reported by users with long-running installations. |
||
|---|---|---|
| .. | ||
| attributes | ||
| calculators | ||
| __init__.py | ||
| chart_data.py | ||
| chart_metadata.py | ||
| core.py | ||
| definitions.py | ||
| helpers.py | ||
| types.py | ||
| value_getters.py | ||