From 70b5a0acd1a93e722edf4fb2eb46acfd8fec6abe Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Sun, 2 Nov 2025 17:50:50 +0000 Subject: [PATCH] fix services --- custom_components/tibber_prices/services.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/tibber_prices/services.py b/custom_components/tibber_prices/services.py index f99457c..338a760 100644 --- a/custom_components/tibber_prices/services.py +++ b/custom_components/tibber_prices/services.py @@ -379,7 +379,9 @@ def _prepare_day_structures(price_info_data: dict, hourly_ratings: list) -> tupl d: [ r for r in hourly_ratings - if day_prefixes[d] and r.get("time", r.get("startsAt", "")).startswith(day_prefixes[d][0]) + if isinstance(r, dict) + and day_prefixes[d] + and r.get("time", r.get("startsAt", "")).startswith(day_prefixes[d][0]) ] if price_info_by_day[d] and day_prefixes[d] else []