hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski b1e0245a60 refactor(coordinator): use IQR% as primary flat-day metric in period relaxation
Replace CV with IQR% as the primary indicator for flat-day detection
in _compute_day_effective_min(). CV is inflated by isolated price spikes
(a single spike at 2× the average pushes CV to 15-25% while the core
price band stays flat), causing the flat-day adaptation to be missed.

IQR% (spread of the central 50% of prices / median) is unaffected by
tail outliers and correctly identifies "flat core + spike" days.

Threshold: LOW_IQR_PCT_FLAT_DAY_THRESHOLD = 15.0%
  - IQR% ≈ 1.35 × CV for symmetric data, so 15% ≈ old CV threshold of 10%
  - Extra headroom catches flat days with a single outlier (IQR%~3%,
    CV~20%) that were previously missed

CV retained as fallback for edge cases where iqr_pct is None
(near-zero or negative median prices).

Impact: Flat days with a single isolated price spike are now correctly
identified, reducing unnecessary relaxation iterations on those days.
2026-04-12 15:31:40 +00:00
..
api feat(api): add energy and tax fields to Tibber GraphQL queries 2026-04-09 18:27:21 +00:00
binary_sensor fix(periods): rename periods_remaining to period_count_remaining 2026-04-12 10:05:21 +00:00
brand feat(brand): update dark icons for improved visual consistency 2026-04-09 19:04:26 +00:00
config_flow_handlers refactor(options_flow): optimize loading of override translations based on active overrides 2026-04-12 08:54:41 +00:00
coordinator refactor(coordinator): use IQR% as primary flat-day metric in period relaxation 2026-04-12 15:31:40 +00:00
custom_translations feat(sensor): add next/previous/rolling-hour price rank sensors 2026-04-12 15:02:27 +00:00
entity_utils refactor: remove dead code across integration 2026-04-11 12:13:26 +00:00
interval_pool perf(interval_pool): hoist fetch_groups and precompute period criteria 2026-04-06 14:35:33 +00:00
number refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
sensor feat(sensor): add next/previous/rolling-hour price rank sensors 2026-04-12 15:02:27 +00:00
services feat(services): add reason codes and schedule comparison details to find services 2026-04-12 12:47:11 +00:00
switch refactor: remove dead code across integration 2026-04-11 12:13:26 +00:00
translations feat(sensor): add next/previous/rolling-hour price rank sensors 2026-04-12 15:02:27 +00:00
utils feat(sensor): add price rank sensors and IQR-based volatility attributes 2026-04-12 14:13:47 +00:00
__init__.py feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
config_flow.py feat(config_flow): add price level gap tolerance for Tibber API level field 2025-12-22 20:25:30 +00:00
const.py feat(periods): implement geometric_extension_attempted flag and time_range filtering 2026-04-12 08:24:38 +00:00
data.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
diagnostics.py refactor(lifecycle): integrate with Pool for sensor metrics 2025-12-23 14:13:34 +00:00
entity.py fix(lint): apply Python 3.14 ruff rules and update HA minimum version 2026-04-11 10:56:34 +00:00
icons.json chore(style): reformat JSON config files from 4-space to 2-space indent 2026-04-12 14:15:04 +00:00
manifest.json chore(style): reformat JSON config files from 4-space to 2-space indent 2026-04-12 14:15:04 +00:00
migrations.py feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
services.yaml feat(services): add reason codes and schedule comparison details to find services 2026-04-12 12:47:11 +00:00