From 32a9f4c0f2b103c9adbe0da1e484612c947aa90d Mon Sep 17 00:00:00 2001 From: Ludy Date: Tue, 8 Aug 2023 13:19:07 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20`last=5Fvalue`=20(#61)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ludy87 --- src/pyecotrend_ista/const.py | 2 +- src/pyecotrend_ista/pyecotrend_ista.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyecotrend_ista/const.py b/src/pyecotrend_ista/const.py index a581720..5901137 100644 --- a/src/pyecotrend_ista/const.py +++ b/src/pyecotrend_ista/const.py @@ -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" diff --git a/src/pyecotrend_ista/pyecotrend_ista.py b/src/pyecotrend_ista/pyecotrend_ista.py index 8c642e4..cb3afd0 100644 --- a/src/pyecotrend_ista/pyecotrend_ista.py +++ b/src/pyecotrend_ista/pyecotrend_ista.py @@ -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: