hass.tibber_prices/custom_components
Julian Pawlowski 5411a75b79 fix(sensor): set state_class=None on static diagnostic metadata sensors
Four non-MONETARY diagnostic sensors had state_class set, causing HA
Recorder to add them to long-term statistics tables unnecessarily:

- home_size (m²):                   SensorStateClass.MEASUREMENT
- main_fuse_size (A):               SensorStateClass.MEASUREMENT
- number_of_residents:              SensorStateClass.MEASUREMENT
- estimated_annual_consumption(kWh):SensorStateClass.TOTAL

All four are static user metadata retrieved from Tibber's user API
(cached for 24 h, rarely or never changes in practice).  They carry no
time-series value: home_size and main_fuse_size don't change, and
estimated_annual_consumption is a rough Tibber estimate, not an actual
accumulating energy counter.

Setting state_class=None removes them from long-term statistics while
keeping normal state-change recording intact.

The three intentional non-None state_class values are unchanged:
- current_interval_price (MONETARY, TOTAL): Energy Dashboard
- current_interval_price_base (MONETARY, TOTAL): Energy Dashboard
- average_price_today (MONETARY, TOTAL): useful weekly/monthly trend

Impact: Reduced Recorder database growth; no user-visible sensor
behaviour change.
2026-04-06 14:24:02 +00:00
..
tibber_prices fix(sensor): set state_class=None on static diagnostic metadata sensors 2026-04-06 14:24:02 +00:00