tesla: Authentication failed since v3.20.2

Since the installation of release 3.20.2, the authentication failed. I try to renew the Refresh Token but I still have issue in the log:

  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 68, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 72, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 197, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 359, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 405, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 502, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tesla_custom/config_flow.py", line 84, in async_step_user
    return await self.async_step_credentials()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tesla_custom/config_flow.py", line 118, in async_step_credentials
    data_schema=self._async_schema(api_proxy_enable=self.use_proxy),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tesla_custom/config_flow.py", line 165, in _async_schema
    if not addon_slug:
           ^^^^^^^^^^
UnboundLocalError: cannot access local variable 'addon_slug' where it is not associated with a value

and

2024-03-13 08:19:09.789 WARNING (MainThread) [homeassistant.config_entries] Config entry 'xxxxxx' for tesla_custom integration could not authenticate

Previous working release was 3.19.11. I will rollback.

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 16 (2 by maintainers)

Most upvoted comments

Same here, updated to 3.20.2 and it stopped working. Reverted to 3.19.11 and reauthenticated with refresh token and everything is working again (Including sending commands).

(Model 3, 2019)

Edit: I am on 2024.3.0

Rolling back to 3.19.11 solve the issue.

I had the above but rollback to 3.19 rectified issue. Then, I upgrade to 3.20.3, failed again, rolled back to 3.19 and this time is deauthenticated permanently. 3.19 offers re-authentication but 3.20 does not. Disabled for now, may actually come back once i setup proxy but writing here to flag that maybe 3.20.3 isn’t a fix.