hass.tibber_prices/custom_components
Julian Pawlowski 807b670ff5 perf(sensors): reduce long-term statistics to 3 MONETARY sensors
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.
2026-04-06 12:47:25 +00:00
..
tibber_prices perf(sensors): reduce long-term statistics to 3 MONETARY sensors 2026-04-06 12:47:25 +00:00