mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Fixed bug in best price flex filter that incorrectly excluded prices when checking for periods. The filter was requiring price >= daily_min, which is unnecessary and could theoretically exclude valid low prices. Changed from: in_flex = price >= criteria.ref_price and price <= flex_threshold To: in_flex = price <= flex_threshold This ensures all low prices up to the threshold are included in best price period consideration, matching the expected behavior described in the period calculation documentation. The fix addresses the user's observation that qualifying intervals appearing after the daily minimum in chronological order should be included if they meet the flex criteria. Co-authored-by: jpawlowski <75446+jpawlowski@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| api | ||
| binary_sensor | ||
| config_flow_handlers | ||
| coordinator | ||
| custom_translations | ||
| entity_utils | ||
| interval_pool | ||
| sensor | ||
| services | ||
| translations | ||
| utils | ||
| __init__.py | ||
| config_flow.py | ||
| const.py | ||
| data.py | ||
| diagnostics.py | ||
| entity.py | ||
| icons.json | ||
| manifest.json | ||
| services.yaml | ||