Skip to content

Commit

Permalink
🐛 fix last_value (#61)
Browse files Browse the repository at this point in the history
Signed-off-by: Ludy87 <Ludy87@users.noreply.github.com>
  • Loading branch information
Ludy87 authored Aug 8, 2023
1 parent 769c472 commit 32a9f4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pyecotrend_ista/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.0.20"
VERSION = "2.0.21"
LOGIN_HEADER = {"Content-Type": "application/json"}
BASE_URL = "https://api.prod.eed.ista.com/"
ACCOUNT_URL = BASE_URL + "account"
Expand Down
2 changes: 1 addition & 1 deletion src/pyecotrend_ista/pyecotrend_ista.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ async def consum_raw(self, select_year=None, select_month=None, filter_none=True
if last_custom_value is None:
last_custom_value = {}
for reading in consumptions[0]["readings"]:
if reading["type"] is None or reading["value"] is None or reading["additionalValue"] is None:
if reading["type"] is None or (reading["value"] is None and reading["additionalValue"] is None):
continue

if reading["type"] not in last_custom_value:
Expand Down

0 comments on commit 32a9f4c

Please sign in to comment.