Skip to content

Commit

Permalink
Merge pull request #2 from Bre77/patch-1
Browse files Browse the repository at this point in the history
Return None instead of Zero
  • Loading branch information
cabberley authored Aug 27, 2024
2 parents a874bda + af1eaac commit aa67866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aemonemdata/aemonem.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ async def _get_current_30min_price(self, regions: list[str]):
if records_count !=0 :
current_30min_avg = round(current_actual_prices/records_count,4)
else:
current_30min_avg = 0
current_30min_avg = None
current_30min_forecast = round((min(current_price_data["forecast"][region], key=lambda x:x["settlement_date"]))["price_kw"],4)
current_30min_estimated = round((current_actual_prices + current_30min_forecast*(6-records_count))/6,4)
current_cumulative_price = round((max(current_price_data["actual"][region], key=lambda x:x["settlement_date"]))["cumulative_price"],0)
Expand Down

0 comments on commit aa67866

Please sign in to comment.