cyberjunky / home-assistant-garmin_connect

The Garmin Connect integration allows you to expose data from Garmin Connect to Home Assistant.
MIT License
238 stars 34 forks source link

Garmin Connect integration stopped working in HomeAssistant #102

Closed masteroftherings closed 1 year ago

masteroftherings commented 1 year ago

All of a sudden I get this error in the log for Garmin Connect integration in HomeAssistant. I have not changed anything.

Does anyone know how to solve this?

Logger: custom_components.garmin_connect Source: custom_components/garmin_connect/init.py:82 Integration: Garmin Connect (documentation, issues) First occurred: 06:56:06 (1 occurrences) Last logged: 06:56:06

Unknown error occurred during Garmin Connect login request Traceback (most recent call last): File "/config/custom_components/garmin_connect/init.py", line 82, in async_login await self.hass.async_add_executor_job(self._api.login) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/garminconnect/init.py", line 270, in login return self.authenticate() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/garminconnect/init.py", line 403, in authenticate self.display_name = user_prefs["displayName"]


TypeError: 'NoneType' object is not subscriptable
esmoyer commented 1 year ago

I re-downloaded the add-on in HACS and re-added my account and that seemed to work.

cyberjunky commented 1 year ago

@esmoyer thank you for the update, too bad reason is not known yet.

prsmith777 commented 1 year ago

Having same issue. Intregation stopped working a few days ago. Nothing changed. Tried deleting and reinstalling but get error when trying to sign in. Updated to latest versions and same issue.

masteroftherings commented 1 year ago

I was not able to log in to Garmin Connect through the integration aswell.

But I think I solved this issue now. First uninstall the integration Garmin Connect from Home Assistant/Integrations. Then remove Garmin Connect from HACS (this will completely remove Garmin Connect from HA). After that restart Home Assistant.

Add Garmin Connect in HACS again. Go to Home Assistant/Integrations and install Garmin Connect again. Now you should be able to login again…

Strux-DK commented 1 year ago

@masteroftherings Did not work for me

prsmith777 commented 1 year ago

Completely removing from HACS then restarting then re- adding to HACS then restarting then adding integration worked. Thanks