Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration experiences uncaught exception while trying to get vehicle location #94

Open
eliasisrael opened this issue Jan 2, 2025 · 1 comment

Comments

@eliasisrael
Copy link

Describe the bug
I am seeing multiple, repeated error mesages in my HA log regarding uncaught exceptions when trying to get the vehicle location.

Diagnostics file
Diag file is attached.

config_entry-audiconnect-4f9ab6e37330629260aa34ccc96e4b77.json

Expected behavior
Catch and handle exception. Better yet, it appears that this is caused by a change to the format from the Audi APIs, so an update to that parsing code might be needed.

Screenshots
N/A

Additional context
Add any other context about the problem here.

Logfile output:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/audiconnect/device_tracker.py:42
integration: Audi Connect (documentation, issues)
First occurred: 6:46:08 AM (64 occurrences)
Last logged: 12:03:51 PM

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 267, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 478, in _async_refresh
self.async_update_listeners()
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 177, in async_update_listeners
update_callback()
~~~~~~~~~~~~~~~^^
File "/config/custom_components/audiconnect/entity.py", line 68, in _handle_coordinator_update
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1029, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/device_tracker/config_entry.py", line 265, in state
if self.latitude is not None and self.longitude is not None:
^^^^^^^^^^^^^
File "/config/custom_components/audiconnect/device_tracker.py", line 42, in latitude
return self.vehicle.position.latitude
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'latitude'

@eliasisrael
Copy link
Author

eliasisrael commented Jan 3, 2025

It appears that reloading the integration clears this error, st least for a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant