From aef471cbc81aafbb4b4c1437c9ace8b6bb7693d4 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski <75446+jpawlowski@users.noreply.github.com> Date: Thu, 13 Nov 2025 23:47:10 +0100 Subject: [PATCH] Update custom_components/tibber_prices/const.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- custom_components/tibber_prices/const.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tibber_prices/const.py b/custom_components/tibber_prices/const.py index 1542d83..8b6da34 100644 --- a/custom_components/tibber_prices/const.py +++ b/custom_components/tibber_prices/const.py @@ -51,8 +51,8 @@ DEFAULT_BEST_PRICE_FLEX = 15 # 15% flexibility for best price (user-facing, per # Peak price flexibility is set to -20 (20%) to allow for more adaptive detection of expensive periods. # This is intentionally more flexible than best price (15%) because peak price periods can be more variable, # and users may benefit from earlier warnings about expensive periods, even if they are less sharply defined. -# The negative sign indicates that the threshold is above the average price, and a higher percentage allows -# for more conservative detection, reducing false negatives for peak price warnings. +# The negative sign indicates that the threshold is set below the MAX price (e.g., -20% means MAX * 0.8), not above the average price. +# A higher percentage allows for more conservative detection, reducing false negatives for peak price warnings. DEFAULT_PEAK_PRICE_FLEX = -20 # 20% flexibility for peak price (user-facing, percent) DEFAULT_BEST_PRICE_MIN_DISTANCE_FROM_AVG = 5 # 5% minimum distance from daily average (ensures significance) DEFAULT_PEAK_PRICE_MIN_DISTANCE_FROM_AVG = 5 # 5% minimum distance from daily average (ensures significance)