From 94b0447383c2a6b551c0f6e24a9b8a783a4b4e66 Mon Sep 17 00:00:00 2001 From: HAEdwin <82239374+HAEdwin@users.noreply.github.com> Date: Mon, 29 Aug 2022 20:40:13 +0200 Subject: [PATCH] Update __init__.py Check on 'timed out' did not trigger, had to use args attribute to extract it. --- custom_components/apsystems_ecur/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/apsystems_ecur/__init__.py b/custom_components/apsystems_ecur/__init__.py index 2dfaf0c..8e11871 100755 --- a/custom_components/apsystems_ecur/__init__.py +++ b/custom_components/apsystems_ecur/__init__.py @@ -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)