fix: Added work around to get Odometer value for AU Kia Niro - #745
fix: Added work around to get Odometer value for AU Kia Niro#745SNilon wants to merge 9 commits into
Conversation
…t_api Fixed merge conflicts
for more information, see https://pre-commit.ci
|
In theory this increases calls to the API which could lead to rate limits. I am good to merge and scream test though. @fuatakgun thoughts? |
…stead of checking if the vehicle object has a odometer value. Original method worked with bluelink.py but not with the home assistant intergration.
for more information, see https://pre-commit.ci
|
thanks for great work, given that this is a cached called, I do not have a problem with rate limits, while I am sure that I am wrong :) There are some users out, reporting that cached calls are even consuming 12v battery. furthermore, we should somehow eliminate the repeating behavior of the code. Can you dump your regular non ccs2 and ccs2 response? |
|
There is an example of each response attached to issue #739, let me know if you want more. The extra API call only happens if the non-CCS2 status is missing the odo value, so this should only result in more API calls for vehicles that are affected by this issue. More testing with other vehicles is probably necessary to confirm this tho. |
Recently I raised an issue (#739) that my AU region Niro didn't have an odometer value. This was due to it being missing in the status response from Kia. The Niro normally requests the non-CCS2 status, however if the CCS2 status is request the response will contain a valid odometer value.
I have implemented a workaround so that the CCS2 status will be request and the odometer value extracted if the non-CCS2 status doesn't contain a valid odometer value.
I have tested this on my car but it would be good if someone else in the AU region were to test it.