Skip to content

Commit

Permalink
Allow typicalUsage and typicalCost to be missing
Browse files Browse the repository at this point in the history
  • Loading branch information
tronikos committed May 11, 2023
1 parent af23fb6 commit ac10323
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/opower/opower.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ async def async_get_forecast(self) -> list[Forecast]:
cost_to_date=float(forecast["costToDate"]),
forecasted_usage=float(forecast.get("forecastedUsage", 0)),
forecasted_cost=float(forecast.get("forecastedCost", 0)),
typical_usage=float(forecast["typicalUsage"]),
typical_cost=float(forecast["typicalCost"]),
typical_usage=float(forecast.get("typicalUsage", 0)),
typical_cost=float(forecast.get("typicalCost", 0)),
)
)
return forecasts
Expand Down

0 comments on commit ac10323

Please sign in to comment.