mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 05:13:40 +00:00
fix services
This commit is contained in:
parent
0eaeaaf708
commit
70b5a0acd1
1 changed files with 3 additions and 1 deletions
|
|
@ -379,7 +379,9 @@ def _prepare_day_structures(price_info_data: dict, hourly_ratings: list) -> tupl
|
||||||
d: [
|
d: [
|
||||||
r
|
r
|
||||||
for r in hourly_ratings
|
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]
|
if price_info_by_day[d] and day_prefixes[d]
|
||||||
else []
|
else []
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue