mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Changed from iterating over each day separately to collecting all intervals for selected days into one continuous list before processing. Changes: - Collect all intervals via get_intervals_for_day_offsets() with all day_offsets at once - Remove outer `for day in days:` loop around interval processing - Build date->day_key mapping during average calculation for lookup - Add _get_day_key_for_interval() helper for average_field assignment - Simplify midnight handling: only extend at END of entire selection - Remove complex "next day lookup" logic at midnight boundaries The segment boundary handling (bridge points, NULL insertion) now works automatically across midnight since intervals are processed as one list. Impact: Fixes bridge point rendering at midnight when rating levels change between days. Simplifies code structure by removing ~60 lines of per-day midnight-specific logic. |
||
|---|---|---|
| .. | ||
| tibber_prices | ||