From ba08bd34c67304ef424f74349a4f795a40fd68e5 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Sun, 3 May 2026 19:43:31 +0000 Subject: [PATCH] chore(periods): house keeping --- custom_components/tibber_prices/coordinator/periods.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/custom_components/tibber_prices/coordinator/periods.py b/custom_components/tibber_prices/coordinator/periods.py index 0633177..bbfc720 100644 --- a/custom_components/tibber_prices/coordinator/periods.py +++ b/custom_components/tibber_prices/coordinator/periods.py @@ -907,8 +907,9 @@ class TibberPricesPeriodCalculator: ) # Check if best price periods should be shown - # If relaxation is enabled, always calculate (relaxation will try "any" filter) - # If relaxation is disabled, apply level filter check + # If relaxation is enabled, always calculate (relaxation tries configured level filter + # first, then falls back to "any" per flex step if still insufficient) + # If relaxation is disabled, apply level filter check upfront if enable_relaxation_best: show_best_price = bool(all_prices) else: @@ -1009,8 +1010,9 @@ class TibberPricesPeriodCalculator: ) # Check if peak price periods should be shown - # If relaxation is enabled, always calculate (relaxation will try "any" filter) - # If relaxation is disabled, apply level filter check + # If relaxation is enabled, always calculate (relaxation tries configured level filter + # first, then falls back to "any" per flex step if still insufficient) + # If relaxation is disabled, apply level filter check upfront if enable_relaxation_peak: show_peak_price = bool(all_prices) else: