Drop summer-winter time
All checks were successful
Build a dev image / build (push) Successful in 23s
All checks were successful
Build a dev image / build (push) Successful in 23s
This commit is contained in:
parent
4638b4b7b2
commit
1a7daca3be
1 changed files with 3 additions and 0 deletions
|
|
@ -70,6 +70,9 @@ def get_energy_prices(d: datetime.date=datetime.date.today(), no_cache:bool=Fals
|
||||||
raise PriceNotFound()
|
raise PriceNotFound()
|
||||||
|
|
||||||
# Only cache if all 24 hours are present
|
# 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
|
if len(hours) in (24, 96): # 96 for 15-min intervals
|
||||||
with open(cache_file, "w") as f:
|
with open(cache_file, "w") as f:
|
||||||
f.write(json.dumps(hours))
|
f.write(json.dumps(hours))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue