Open busywait opened 7 months ago
I added data from my logs to the description.
The correct location is logged at 2024-04-20 15:26:11.913 in this excerpt, and the incorrect location is logged at 2024-04-20 15:27:57.793 and 2024-04-20 15:27:58.468.
Is a stale value (time stamped 'time': '20240420142755'
) over-writing the correct value (time stamped 'time': '20240420161550'
)?
I haven't seen this being a problem in the last few days. Perhaps something has changed (been fixed!) in the Kia/Hyundai API? Edit: Nope, not fixed, still seeing this problem.
Region and Brand of car
UK (EU) e-Niro 4 2019/20 model Firmware: 2020-09-12 16:37:08.905
Version of the integration
v2.24.2
Describe the bug
At the end of a journey a stale location is reported in the first forced update after the car is turned off (the first forced update with Engine OFF reported in the API). The next forced update will report the correct location, so it might look like the car has moved a very large distance and then back again between the last 3 updates.
This is seen in the _geocoded_location sensor and in the _location diagnostic entity.
Debug logs if an error occurred
My current timezone is GMT with DST. The HA log timestamps are in UST, the times in the json seem to be in my local time (UST+01:00). The correct location is logged at 2024-04-20 15:26:11.913 in this excerpt, and the incorrect location is logged at 2024-04-20 15:27:57.793 and 2024-04-20 15:27:58.468.
To Reproduce
I have the scan interval configured to refresh every 15 minutes. I have the Forced Update interval configured to 9999 (6.9 days), No Force Refresh Start Hour is 23 and the No Force Refresh Finish Hour is 23.
I have an automation that uses a timer to call the Forced Update service every 12 minutes as long as the Engine is On:
Expected behavior
At the end of the journey the geocoded location and the location GPS should show the final location; stale data should not be presented.
Screenshots
In the dashboard shown below the car made a one-way journey from Bristol (top left) to Southampton (bottom right):
This the configuration that I use for the integration:
Additional context