BHSPitMonkey / homeassistant-garmin-mapshare

Home Assistant custom integration for Garmin MapShare feeds
MIT License
6 stars 1 forks source link

Unexpected error, when setting up the integration #7

Open karba78 opened 1 month ago

karba78 commented 1 month ago

Hello thank you for your code installed the integration without issue when setting it up with my shared url I systematically get the "unexpected error" message tried with and without password ( on Garmin shared page parameter) does not change anything thank you

This error originated from a custom integration.

Logger: custom_components.garmin_mapshare.config_flow Source: custom_components/garmin_mapshare/config_flow.py:63 integration: Garmin MapShare (documentation, issues) First occurred: 10:11:20 AM (5 occurrences) Last logged: 10:14:43 AM

Unexpected exception Traceback (most recent call last): File "/config/custom_components/garmin_mapshare/config_flow.py", line 63, in async_step_user info = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/garmin_mapshare/config_flow.py", line 41, in validate_input if not await hub.authenticate(): ^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/garmin_mapshare/kml_fetch.py", line 57, in authenticate devices = await self.fetch_data() ^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/garmin_mapshare/kml_fetch.py", line 93, in fetch_data r.raise_for_status() File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 761, in raise_for_status raise HTTPStatusError(message, request=request, response=self) httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://share.garmin.com/Feed/Share/https://share.garmin.com/share/xxxxxx' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400

karba78 commented 1 month ago

solved, had to put only the last part (name) in the parameter, not the full url this