I’ve been using the Kia integration for several months without any problem.
I’ve been away from home for a couple of weeks, during which time the Kia app on my phone was upgraded to the new Kia app from the previous. It was a bit of a pain. I only mention this as that change might be relevant.
Roughly the same time the Kia integration seemed to fail on my HASS. I’ve tried deleting the integration and re-installing it but all it does when I key in the userid/password/pin at setup time is produce an ‘Unexpected Error’ message.
Looking at the log I see the following:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 183, in login
authorization_code = self._get_authorization_code_with_redirect_url(
username, password, cookies
)
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1169, in _get_authorization_code_with_redirect_url
code = parse_qs(parsed_redirect.query).get("code")[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/kia_uvo/config_flow.py", line 148, in async_step_user
await validate_input(self.hass, user_input)
File "/config/custom_components/kia_uvo/config_flow.py", line 92, in validate_input
token: Token = await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api.login, user_input[CONF_USERNAME], user_input[CONF_PASSWORD]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 188, in login
authorization_code = self._get_authorization_code_with_form(
username, password, cookies
)
File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1232, in _get_authorization_code_with_form
login_form_action_url = soup.find("form")["action"].replace("&", "&")
~~~~~~~~~~~~~~~~~^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
Has anybody had a problem similar to this and found a solution please?
** note: Updated with more information from the log, having log open when doing this allowed me to seem more messages **