hass.tibber_prices/custom_components/tibber_prices/sensor
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
..
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 fix(sensor): set state_class=None on static diagnostic metadata sensors 2026-04-06 14:24:02 +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