Hi,
at first thanks for all your good work. I have a problem with this integration. It happend now the 3rd time. So maybe it is worth to have a look at it.
After reboot of my HA Hardware the VWID integration won't work any more. I get the following errors:
2021-11-26 10:44:31 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up vwid platform for sensor
Traceback (most recent call last):
File "/config/custom_components/vwid/sensor.py", line 65, in async_update_data
data = await api.get_status()
File "/config/custom_components/vwid/libvwid.py", line 145, in get_status
response = await self.session.get(API_BASE + "/vehicles/" + self.vin + "/status", headers=self.headers)
File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1081, in create_connection
transport, protocol = await self._create_connection_transport(
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1111, in _create_connection_transport
await waiter
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/vwid/sensor.py", line 70, in async_update_data
_LOGGER.exception("Error retrieving data")
File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 55, in __aexit__
self._do_exit(exc_type)
File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 92, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
return await self.update_method()
File "/config/custom_components/vwid/sensor.py", line 71, in async_update_data
except ApiAuthError as err:
NameError: name 'ApiAuthError' is not defined
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/vwid/sensor.py", line 87, in async_setup_entry
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 161, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady: name 'ApiAuthError' is not defined
After that I have to delete the integratio and add it again. Then everything works until next restart my Pi.
Do you have any idea, what I do wrong?
Kind Regards
Micha