mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-05-28 18:43:40 +00:00
Phase 3: When geometric bonus intervals cause CV gate failure, strip them from period edges (unextended boundaries) and set geometric_extension_attempted=True on the summary. Previously only geometric_extension_active was tracked. Moved LOW_PRICE_QUALITY_BYPASS_THRESHOLD constant to types.py for shared access. Phase 4: Add time_range: tuple[datetime, datetime] | None parameter to build_periods(), calculate_periods(), and calculate_periods_with_relaxation(). Filters candidate intervals to [start, end) without affecting day-wide reference prices. Refactored _apply_segment_forcing() to use time_range instead of the restricted_prices list approach. Impact: Period statistics now accurately reflect when geometric flex extension was attempted but reverted due to quality gate failure. Segment forcing uses a cleaner API that preserves full price context for reference calculations. |
||
|---|---|---|
| .. | ||
| de.json | ||
| en.json | ||
| nb.json | ||
| nl.json | ||
| sv.json | ||