hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski ce049e48b1 fix(interval_pool): use UTC-aware gap detection to prevent spring-forward false positives
_get_sensor_interval_stats() computed expected_count via UTC time
arithmetic ((end - start).total_seconds() / 900 = 480 for 5 days), then
iterated through fixed-offset local timestamps adding timedelta(minutes=15).

On DST spring-forward days (e.g. last Sunday March in EU), clocks skip
from 02:00 to 03:00. The 4 local quarter-hour slots 02:00-02:45 never
exist, so the Tibber API never returns intervals for them. The iteration
still visits those 4 keys, finds them absent from the index, and reports
has_gaps=True (expected=480, actual=476). Since no API call can ever
fill those non-existent slots, the pool triggers an unnecessary gap-fill
fetch every 15 minutes for the entire spring-forward day.

Fix: keep the nominal expected_count for diagnostics, but determine
has_gaps via the new _has_real_gaps_in_range() helper that sorts
cached intervals by UTC time and checks consecutive UTC differences.
The 01:45+01:00 -> 03:00+02:00 transition is exactly 15 minutes in
UTC, so no gap is reported. Start/end boundary comparisons use naive
19-char local timestamps to stay consistent with the fixed-offset
arithmetic used by get_protected_range().

Impact: No spurious API fetches on DST spring-forward Sunday. Gap
detection for real missing data (API failures, first startup) remains
fully functional.
2026-04-06 13:57:03 +00:00
..
api fix(api): handle None values in API responses to prevent AttributeError 2025-12-13 14:02:30 +00:00
binary_sensor refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
config_flow_handlers fix(translations): update API token instructions to use placeholder for Tibber URL 2026-03-29 18:19:42 +00:00
coordinator fix(coordinator): preserve currency and home_id in re-transform calls 2026-04-06 13:51:59 +00:00
custom_translations feat(config_flow): show override warnings when config entities control settings 2026-01-21 17:36:51 +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): use UTC-aware gap detection to prevent spring-forward false positives 2026-04-06 13:57:03 +00:00
number refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
sensor refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
services fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
switch refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
translations fix(translations): update API token instructions to use placeholder for Tibber URL 2026-03-29 18:19:42 +00:00
utils feat(sensors): add 5-level price trend scale with configurable thresholds 2026-01-20 13:36:01 +00:00
__init__.py feat(config_flow): show override warnings when config entities control settings 2026-01-21 17:36:51 +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(sensors): add 5-level price trend scale with configurable thresholds 2026-01-20 13:36: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.27.0 2026-03-29 18:49:21 +00:00
services.yaml feat(services): add hourly resolution option for chart data services 2026-01-20 15:51:34 +00:00