diff --git a/calculator/miner.py b/calculator/miner.py index 4a4c1d3..b6e9ea8 100644 --- a/calculator/miner.py +++ b/calculator/miner.py @@ -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))