Hyundai-Kia-Connect / hyundai_kia_connect_api

This is a Kia UVO and Hyundai Bluelink written in python. It is primary consumed by home assistant. If you are looking for a home assistant Kia / Hyundai implementation please look here: https://github.com/Hyundai-Kia-Connect/kia_uvo. Much of this base code came from reading bluelinky and contributions to the kia_uvo home assistant project.
MIT License
120 stars 70 forks source link

Missing entities : EV Battery level #477

Closed yoan31 closed 7 months ago

yoan31 commented 8 months ago

Description

I'm missing the entities EV Battery Level.

I get the following errror in the log:

Logger: hyundai_kia_connect_api.KiaUvoApiEU
Source: /usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py:339
First occurred: 22:51:06 (1 occurrences)
Last logged: 22:51:06

Failed to parse driving info. Possible reasons: - incompatible vehicle (ICE) - new API format - API outage
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 334, in update_vehicle_with_cached_state
    state = self._get_driving_info(token, vehicle)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1073, in _get_driving_info
    and drivingInfoItem["calculativeOdo"] > 0
        ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'calculativeOdo'
jwillemsen commented 8 months ago

I think #480 will fix this, similar to #440

cdnninja commented 7 months ago

Try test the latest.

oystersoft commented 6 months ago

Device info CD PHEV 20 by Kia Europe HA 2024.3.1 Kia Uvo / Hyundai Bluelink ( latest version via HACS )


Logger: hyundai_kia_connect_api.KiaUvoApiEU Source: /usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py:362 First occurred: March 17, 2024 at 07:15:22 (9 occurrences) Last logged: 05:16:50

Failed to parse driving info. Possible reasons: - incompatible vehicle (ICE) - new API format - API outage Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 357, in update_vehicle_with_cached_state state = self._get_driving_info(token, vehicle) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1382, in _get_driving_info and drivingInfoItem["calculativeOdo"] > 0


KeyError: 'calculativeOdo'

---------------------------------------------------------

Logger: hyundai_kia_connect_api.KiaUvoApiEU
Source: /usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py:389
First occurred: March 17, 2024 at 09:15:49 (3 occurrences)
Last logged: March 17, 2024 at 17:16:47

Failed to parse driving info. Possible reasons: - new API format - API outage
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 384, in force_refresh_vehicle_state
    state = self._get_driving_info(token, vehicle)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1382, in _get_driving_info
    and drivingInfoItem["calculativeOdo"] > 0
        ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'calculativeOdo'