Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
Check on 'timed out' did not trigger, had to use args attribute to extract it.
  • Loading branch information
HAEdwin authored Aug 29, 2022
1 parent 0d6a745 commit 94b0447
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/apsystems_ecur/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def update(self):
data = self.use_cached_data(msg)

except Exception as err:
if err != 'timed out':
msg = f"Using cached data from last successful communication from ECU. Exception error: {err}"
msg = f"Using cached data from last successful communication from ECU. Exception error: {err}"
if err.args[0] != 'timed out':
_LOGGER.warning(msg)
data = self.use_cached_data(msg)

Expand Down

0 comments on commit 94b0447

Please sign in to comment.