From a12e6b0440a5036f92189f10d1da63471e46eec3 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski <75446+jpawlowski@users.noreply.github.com> Date: Thu, 13 Nov 2025 23:48:24 +0100 Subject: [PATCH] Update custom_components/tibber_prices/period_utils/relaxation.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- custom_components/tibber_prices/period_utils/relaxation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/tibber_prices/period_utils/relaxation.py b/custom_components/tibber_prices/period_utils/relaxation.py index cf63b59..45e9d33 100644 --- a/custom_components/tibber_prices/period_utils/relaxation.py +++ b/custom_components/tibber_prices/period_utils/relaxation.py @@ -452,18 +452,18 @@ def relax_single_day( # noqa: PLR0913 - Comprehensive filter relaxation per day # Calculate periods with this flex + filter combination # Apply level override if specified - level_filter_value = lvl_override if lvl_override else config.level_filter + level_filter_value = lvl_override if lvl_override is not None else config.level_filter # Log filter changes flex_pct = round(abs(new_flex) * 100, 1) - if lvl_override: + if lvl_override is not None: _LOGGER.debug( "%sDay %s flex=%.1f%%: OVERRIDING level_filter: %s → %s", INDENT_L2, day_label, flex_pct, config.level_filter or "None", - lvl_override.upper(), + str(lvl_override).upper(), ) relaxed_config = config._replace(