mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 05:13:40 +00:00
Restructured relaxation mechanism to process each day independently instead of globally, enabling different days to relax at different levels. Key changes: - Added hierarchical logging with INDENT_L0-L5 constants - Replaced global relaxation loop with per-day relaxation (_relax_single_day) - Implemented 4×4 matrix strategy (4 flex levels × 4 filter combinations) - Enhanced _resolve_period_overlaps with replacement and extension logic - Added helper functions: _group_periods_by_day, _group_prices_by_day, _check_min_periods_per_day Relaxation strategy: - Each flex level tries 4 filter combinations before increasing flex - Early exit after EACH successful combination (minimal relaxation) - Extensions preserve baseline metadata, replacements use relaxed metadata - Only standalone periods count toward min_periods requirement Impact: Users get more accurate period detection per day. Days with clear cheap/expensive patterns use strict filters while difficult days relax as needed. Reduces over-relaxation - finds 'good enough' solutions faster. |
||
|---|---|---|
| .. | ||
| custom_translations | ||
| translations | ||
| __init__.py | ||
| api.py | ||
| average_utils.py | ||
| binary_sensor.py | ||
| config_flow.py | ||
| const.py | ||
| coordinator.py | ||
| data.py | ||
| diagnostics.py | ||
| entity.py | ||
| manifest.json | ||
| period_utils.py | ||
| price_utils.py | ||
| sensor.py | ||
| services.py | ||
| services.yaml | ||