Since a few days the BMW Connected Drive integration fails. It started with the location of the car not being updated, to entities becoming unavailable. Reloading the integration made the entities available again, except the location of the car.
The integration dashboard shows: Retrying setup: local variable ‘response’ referenced before assignment
Lofgfile:
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/bimmer_connected/account.py”, line 128, in _login_row_na
r_oauth_settings.raise_for_status()
File “/usr/local/lib/python3.9/site-packages/requests/models.py”, line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://cocoapi.bmwgroup.com/eadrax-ucs/v1/presentation/oauth/config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/bimmer_connected/account.py”, line 220, in _login_row_na
err = response.json()
UnboundLocalError: local variable ‘response’ referenced before assignment
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 191, in _async_refresh
self.data = await self._async_update_data()
File “/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/coordinator.py”, line 59, in _async_update_data
self.account = await self.hass.async_add_executor_job(
File “/usr/local/lib/python3.9/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.9/site-packages/bimmer_connected/account.py”, line 88, in init
self._get_vehicles()
File “/usr/local/lib/python3.9/site-packages/bimmer_connected/account.py”, line 383, in _get_vehicles
self._get_oauth_token()
File “/usr/local/lib/python3.9/site-packages/bimmer_connected/account.py”, line 113, in _get_oauth_token
raise ex
File “/usr/local/lib/python3.9/site-packages/bimmer_connected/account.py”, line 99, in _get_oauth_token
token_data = self._login_row_na()
File “/usr/local/lib/python3.9/site-packages/bimmer_connected/account.py”, line 223, in _login_row_na
_LOGGER.error(“Authentication failed: %s”, response.text)
UnboundLocalError: local variable ‘response’ referenced before assignment
Anyone else experiencing the same? Or any solution known?
Thanks. It is not super critical to me, so I will wait for the next update, but good to know that it will be fixed and it is not BMW that completly turned off the API. Altough that wouldn’t surprise me.