Skip to content

Commit

Permalink
Merge pull request #13 from uphillbattle/maxhours_average_consumption…
Browse files Browse the repository at this point in the history
…_fix

maxhours_average_consumption bugfix
  • Loading branch information
uphillbattle authored Feb 2, 2023
2 parents ccf53da + f616002 commit 909fe88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nettleie_elvia.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ def set_states(self, retry_function, wait_period):
self.log('__function__: Ooops, maxhours API response could not be read, retrying in {} seconds...\n{}'.format(wait_period, e), log="main_log", level="WARNING")
self.run_in(retry_function, wait_period)

self.maxhours_max_consumption_this_month = []
self.maxhours_max_consumption_last_month = []
self.maxhours_max_consumption_this_month = []
self.maxhours_max_consumption_last_month = []
self.maxhours_average_consumption_this_month = []
self.maxhours_average_consumption_last_month = []
for element in self.maxhours_response["meteringpoints"][0]["maxHoursAggregate"]:
if element["noOfMonthsBack"] == 0:
self.maxhours_average_consumption_this_month = element["averageValue"]
Expand Down

0 comments on commit 909fe88

Please sign in to comment.