hass.tibber_prices/custom_components/tibber_prices/sensor/attributes
Julian Pawlowski 6f5261785b feat(sensor): add price rank sensors and IQR-based volatility attributes
Add three new price rank sensors that show where today's/tomorrow's/combined
average price falls relative to all intervals in the evaluated window:
- price_rank_today: today's average price percentile rank (0–100%)
- price_rank_tomorrow: tomorrow's average price percentile rank
- price_rank_today_tomorrow: combined today+tomorrow percentile rank

Extend all volatility sensors with IQR-based band statistics:
- price_typical_spread: interquartile range (IQR) in currency subunit
- price_typical_spread_%: IQR as percentage of daily average
- price_spike_count: number of intervals outside Tukey fences (outliers)

Add calculate_iqr_stats() utility function in utils/price.py that computes
the 25th/75th percentiles, IQR, outer fences (Q1 - 1.5×IQR / Q3 + 1.5×IQR),
and outlier count for any list of price values. Entity keys and attribute
names use plain language (`price_rank`, `price_typical_spread`) as primary
labels; technical terms (percentile rank, IQR) are included parenthetically
in descriptions and documentation.

Impact: Users can now see where current day prices rank compared to their window and how tightly clustered or spike-prone a day's prices are.
2026-04-12 14:13:47 +00:00
..
__init__.py feat(sensor): add price rank sensors and IQR-based volatility attributes 2026-04-12 14:13:47 +00:00
daily_stat.py feat(sensors): expose energy/tax breakdown as sensor attributes 2026-04-09 18:27:36 +00:00
future.py fix(lint): apply Python 3.14 ruff rules and update HA minimum version 2026-04-11 10:56:34 +00:00
helpers.py feat(sensors): always show both mean and median in average sensor attributes 2025-12-18 15:12:30 +00:00
interval.py feat(sensors): expose energy/tax breakdown as sensor attributes 2026-04-09 18:27:36 +00:00
lifecycle.py fix(sensor): streamline lifecycle attrs and next poll visibility 2025-12-26 12:13:36 +00:00
metadata.py feat(sensors): add day pattern detection sensors (valley/peak/flat/rising/falling) 2026-04-11 21:07:16 +00:00
timing.py fix(lint): apply Python 3.14 ruff rules and update HA minimum version 2026-04-11 10:56:34 +00:00
trend.py feat(sensors)!: rename trend change countdown sensor for naming consistency 2026-04-10 09:08:27 +00:00
volatility.py feat(sensor): add price rank sensors and IQR-based volatility attributes 2026-04-12 14:13:47 +00:00
window_24h.py feat(sensors)!: add configurable median/mean display for average sensors 2025-12-08 17:53:40 +00:00