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

Odometer is in unknown state after data update #865

Open
Speederer opened this issue Apr 14, 2024 · 6 comments
Open

Odometer is in unknown state after data update #865

Speederer opened this issue Apr 14, 2024 · 6 comments

Comments

@Speederer
Copy link

Region and Brand of car
IONIQ 5 EU

Version of the integration
2.24.2

Describe the bug
Odometer turns to unknown state after some data update for ~30 minutes. I think it happens when the car parked, not in used.
Other sensors work fine.

Expected behavior
Also the odometer sensor gets the real updated value, or at least shows the previous one.

Screenshots
2024-04-14 22_09_25-Home Assistant - Mushroom – Home Assistant
2024-04-14 22_16_29-Home Assistant - History – Home Assistant

@Speederer
Copy link
Author

I have a leased car with limited km range for 5 years. I wanted to use this odometer entity to compare my traveled kilometers with the number of kilometers that can be covered in proportion to the time. By default I got such diagrams:
2024-04-20 21_39_04-Home Assistant - History – Home Assistant
As you can see it's not the best. But after I created a helper entity for odometer where there is no "unknown" value, it looks fine.

So I already have a workaround for this problem, but I still don't understand why only the odometer has this issue, the other sensors work fine.

@johny-mnemonic
Copy link

Yeah, odometer behaves weird for me as well on Kona 2020.
Even though all other sensors have a value or gets an update, odometer often doesn't and manual call for data refresh is needed.

@Speederer
Copy link
Author

Speederer commented Aug 23, 2024

I investigated the problem a bit, and it looks like during the force update the odometer parameter is missing.
Force update on the left side, normal/cached update on the right side:
image
Left side timestamp: 2024-08-23 07:05:38.306
Right side timestamp: 2024-08-23 07:35:41.696
This can cause the 30-minute gaps in the history of odometer, because it really doesn't get data about the kilometers traveled.
image

Could you modify the integration to handle this kind of situations? I mean just to use the last known values for odometer if it is not provided during the api call, to avoid the unknown state.

@Speederer
Copy link
Author

I have found this thread inside the hyundai_kia_connect_api issues:
force_refresh_all_vehicles_states() - doesn't return odometer values #290
It looks like this is not a unique problem, but a general one.
I hope there will be a workaround solution.

@cdnninja
Copy link
Collaborator

Master branch has a fix that could use testing. It will release as a version in a few days.

@Speederer
Copy link
Author

I updated it a few days ago. Since then it looks fine.
Thanks for your help!

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

3 participants