From 8f400ff693220a512399faaaf67d7dc663544e36 Mon Sep 17 00:00:00 2001 From: saniho Date: Mon, 9 Sep 2024 20:51:38 +0200 Subject: [PATCH] correction si pas de ecowatt --- custom_components/apiEnedis/myCheckData.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/apiEnedis/myCheckData.py b/custom_components/apiEnedis/myCheckData.py index d7699b8..e9b3fca 100644 --- a/custom_components/apiEnedis/myCheckData.py +++ b/custom_components/apiEnedis/myCheckData.py @@ -50,7 +50,8 @@ def analyseValueEcoWatt(self, data): from datetime import datetime for date in data.keys(): # si pas de données - if "detail" in data.keys(): return listeEcoWattDate + if "detail" in data.keys(): + return listeEcoWattDate for detailDate in data[date]["detail"]: detailDatekey = datetime.strptime(detailDate, "%Y-%m-%d %H:%M:%S") listeEcoWattDate[detailDatekey] = data[date]["detail"][detailDate]