hass.tibber_prices/custom_components/tibber_prices/sensor
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
..
attributes fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
calculators fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
__init__.py refactor(currency)!: rename major/minor to base/subunit currency terminology 2025-12-11 08:26:30 +00:00
chart_data.py feat(sensors): add chart_metadata sensor for lightweight chart configuration 2025-12-05 20:30:54 +00:00
chart_metadata.py fix: support main and subunit currency 2025-12-11 23:07:06 +00:00
core.py feat(sensors): add 5-level price trend scale with configurable thresholds 2026-01-20 13:36:01 +00:00
definitions.py perf(sensors): reduce long-term statistics to 3 MONETARY sensors 2026-04-06 12:47:25 +00:00
helpers.py feat(sensors): always show both mean and median in average sensor attributes 2025-12-18 15:12:30 +00:00
types.py feat(types): add TypedDict documentation and BaseCalculator helpers 2025-11-22 14:32:24 +00:00
value_getters.py feat(sensor): convert timing sensors to hour-based display with minute attributes 2025-12-26 16:03:00 +00:00