Skip to content

Commit

Permalink
correction si pas de ecowatt
Browse files Browse the repository at this point in the history
  • Loading branch information
saniho committed Sep 9, 2024
1 parent 52a793a commit 4796473
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/apiEnedis/myCall.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def isAvailable() -> bool:
timestamp = datetime.datetime.now().timestamp()
_LOGGER.debug(
f"Ancien timeout? {timestamp}-{myCall._lastTimeout}"
f"={timestamp-myCall._lastTimeout}"
f"={timestamp - myCall._lastTimeout}"
f"> {MAX_PREVIOUS_TIMEOUT} ?"
)
if timestamp - myCall._lastTimeout > MAX_PREVIOUS_TIMEOUT:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/apiEnedis/myCheckData.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ 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]
Expand Down

0 comments on commit 4796473

Please sign in to comment.