Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 kia vehicles error #173

Open
skyw33 opened this issue Oct 21, 2024 · 0 comments
Open

2 kia vehicles error #173

skyw33 opened this issue Oct 21, 2024 · 0 comments

Comments

@skyw33
Copy link

skyw33 commented Oct 21, 2024

Please check Services, Known Bug / Issues and Troubleshooting over here first: https://github.com/dahlb/ha_kia_hyundai/blob/master/README.md
Region and Brand of car
USA Kia

Describe the bug
I setup 2 Kia vehicles, one EV (2024 Niro EV) and one Plug-in Hybrid (2022 Sorento PHEV). The setup was successful, but then I got an error. I removed the integration and setup the vehicles again with no problem. Then I got the error again after a couple days of it working.

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 5:12:49 AM (1 occurrences)
Last logged: 5:12:49 AM

Error setting up entry My NIRO EV (NIRO EV) for ha_kia_hyundai
Traceback (most recent call last):
  File "/config/custom_components/ha_kia_hyundai/api_cloud_us_kia.py", line 32, in request_with_active_session_wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ha_kia_hyundai/api_cloud_us_kia.py", line 116, in get_vehicles
    api_vehicles = await self.api.get_vehicles(session_id)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/kia_hyundai_api/us_kia.py", line 182, in get_vehicles
    await self._get_request_with_logging_and_errors_raised(
  File "/usr/local/lib/python3.12/site-packages/kia_hyundai_api/us_kia.py", line 55, in request_with_logging_wrapper
    raise AuthError
kia_hyundai_api.errors.AuthError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ha_kia_hyundai/__init__.py", line 224, in async_setup_entry
    hass_vehicle: Vehicle = await api_cloud_instance.get_vehicle(
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ha_kia_hyundai/api_cloud.py", line 49, in get_vehicle
    vehicles = await self.get_vehicles()
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ha_kia_hyundai/api_cloud_us_kia.py", line 36, in request_with_active_session_wrapper
    vehicle: Vehicle = kwargs["vehicle"]
                       ~~~~~~^^^^^^^^^^^
KeyError: 'vehicle'

Outlined here: https://github.com/dahlb/ha_kia_hyundai/blob/master/README.m

To Reproduce
Steps to reproduce the behavior:

  1. On integration page click "Add Entry": Select Niro EV. Successfully added.
  2. "Add Entry": Select Sorento PHEV. Successfully added.
  3. Everything works for a couple days.
  4. See error

Expected behavior
It should work longer than 2 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant