Drop summer-winter time
All checks were successful
Build a dev image / build (push) Successful in 23s

This commit is contained in:
Adam Štrauch 2025-10-26 02:22:46 +01:00
parent 4638b4b7b2
commit 1a7daca3be
Signed by: cx
GPG key ID: 7262DAFE292BCE20

View file

@ -70,6 +70,9 @@ def get_energy_prices(d: datetime.date=datetime.date.today(), no_cache:bool=Fals
raise PriceNotFound()
# Only cache if all 24 hours are present
if len(hours) == 100:
hours = hours[0:8] + hours[12:100]
if len(hours) in (24, 96): # 96 for 15-min intervals
with open(cache_file, "w") as f:
f.write(json.dumps(hours))