hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski ec3bc9f84d fix(interval_pool): rebuild index after GC dead interval cleanup
_cleanup_dead_intervals() compacts group["intervals"] in-place after
removing dead (touched) intervals. Surviving intervals shift to new
positions, but the timestamp index was not updated to reflect this.

_remove_empty_groups() only rebuilds the index when groups become
completely empty. For partially-compacted groups (some dead intervals
removed but group still has living intervals), no rebuild happened.
This left stale interval_index values that point past the end of
the compacted list, causing IndexError in _get_cached_intervals.

Fix: after _remove_empty_groups, if dead intervals were cleaned but
no groups became empty, explicitly rebuild the index so positions
reflect the compacted group["intervals"] lists.

Adds regression test reproducing the exact partial-touch scenario
that triggers stale index entries after in-place compaction.

Fixes #118

Impact: Brand-new Tibber users can now set up the integration
without getting "Failed setup, will retry: list index out of range".
2026-04-17 11:15:08 +00:00
..
api feat(api): add energy and tax fields to Tibber GraphQL queries 2026-04-09 18:27:21 +00:00
binary_sensor perf(sensors): add call-avoidance for timer-based state updates 2026-04-09 19:04:04 +00:00
brand feat(brand): update dark icons for improved visual consistency 2026-04-09 19:04:26 +00:00
config_flow_handlers feat(sensors)!: rename price_trend_Xh → price_outlook_Xh, add price_trajectory_Xh 2026-04-09 16:08:42 +00:00
coordinator feat(sensors)!: rename price_trend_Xh → price_outlook_Xh, add price_trajectory_Xh 2026-04-09 16:08:42 +00:00
custom_translations feat(translations): add price_outlook_Xh and price_trajectory_Xh strings 2026-04-09 16:08:54 +00:00
entity_utils fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
interval_pool fix(interval_pool): rebuild index after GC dead interval cleanup 2026-04-17 11:15:08 +00:00
number refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
sensor perf(sensors): add call-avoidance for timer-based state updates 2026-04-09 19:04:04 +00:00
services feat(services): add energy/tax fields to get_chartdata action 2026-04-09 18:27:53 +00:00
switch refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
translations feat(services): add energy/tax fields to get_chartdata action 2026-04-09 18:27:53 +00:00
utils feat(trend): add direction-group detection, noise floor, and confirmation hysteresis 2026-04-07 13:44:01 +00:00
__init__.py feat(config_flow): add trend confirmation and noise floor settings 2026-04-07 13:44:47 +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(trend): add direction-group detection, noise floor, and confirmation hysteresis 2026-04-07 13:44:01 +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(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
icons.json feat(services): add hourly resolution option for chart data services 2026-01-20 15:51:34 +00:00
manifest.json chore(release): bump version to 0.30.0 2026-04-09 19:05:27 +00:00
services.yaml feat(services): add energy/tax fields to get_chartdata action 2026-04-09 18:27:53 +00:00