Update custom_components/tibber_prices/coordinator.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Julian Pawlowski 2025-11-12 17:49:25 +01:00 committed by GitHub
parent 3e22292c77
commit d02e460b1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -903,9 +903,12 @@ class TibberPricesDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
# Periods shorter than MIN_INTERVALS_FOR_GAP_TOLERANCE (1.5h) use strict filtering
if interval_count < MIN_INTERVALS_FOR_GAP_TOLERANCE:
period_type = "peak" if reverse_sort else "best"
_LOGGER.debug(
"Using strict filtering for short period (%d intervals)",
"Using strict filtering for short %s period (%d intervals < %d min required for gap tolerance)",
period_type,
interval_count,
MIN_INTERVALS_FOR_GAP_TOLERANCE,
)
return self._check_short_period_strict(today_intervals, level_order, reverse_sort=reverse_sort)