diff --git a/custom_components/tractive/device_tracker.py b/custom_components/tractive/device_tracker.py index 4a5a6f2..842cdfa 100644 --- a/custom_components/tractive/device_tracker.py +++ b/custom_components/tractive/device_tracker.py @@ -169,13 +169,13 @@ async def _fetch_tracker_data(self, tracker_id): resp.status, resp.reason, ) - return [] + return [], None result = await resp.json() except aiohttp.ClientError as err: _LOGGER.error("Error connecting to Tractives: %s ", err, exc_info=True) raise except asyncio.TimeoutError: - return [] + return [], None time_from = max(result["first"], result["last"] - 3600 * 24) @@ -194,7 +194,7 @@ async def _fetch_tracker_data(self, tracker_id): resp.status, resp.reason, ) - return [] + return [], None result = await resp.json() except aiohttp.ClientError as err: _LOGGER.error("Error connecting to Tractives: %s ", err, exc_info=True)