mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-07-27 17:26:48 +00:00
_find_cheapest_window_in_pool() scans for contiguous available blocks when scheduling multiple tasks. When a block-in-progress hit a temporal gap (e.g. from price-level filtering removing intervals from the middle of the search range, or missing API data), the scanner jumped to i = j + 1 instead of i = j, silently skipping the interval right after the gap as a valid — sometimes cheaper — window start. Distinguish 'unavailable slot' (correctly skipped via j + 1) from 'temporal gap' (must retry at j, since that slot was never actually tested as a window start). Impact: find_cheapest_schedule can now find the true cheapest window for a task when the search range contains time gaps, instead of occasionally picking a more expensive window right after such a gap. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_connect_segments.py | ||
| test_energy_calculator.py | ||
| test_find_cheapest_schedule_internals.py | ||
| test_find_service_responses.py | ||
| test_period_data_format.py | ||
| test_plan_charging.py | ||
| test_power_scheduler.py | ||
| test_search_range.py | ||
| test_sequential_scheduling.py | ||