kia_uvo icon indicating copy to clipboard operation
kia_uvo copied to clipboard

feat: Check for updates WIP

Open torbjornaxelsson opened this issue 2 years ago • 3 comments

Proposal for tracking API status updates, solution for issue #440. Also see pull request in the hyundai_kia_connect_api repo with required changes to the API. Work in progress, thankful for any input. The code works for me (CA/Hyundai)

Changes in kia_uvo

  • all vehicle commands call async_wait_for_action_completed after the action has beeen sent (rather than async_request_refresh which just receives stale data)
  • async_wait_for_action_completed calls vm.check_action_status every X seconds a maximum of Y times
  • when vm.check_action_status responds True, async_refresh() is called to refresh values in HA

Changes in hyundai_kia_connect_api

  • CA.check_last_action_status updates vehicle properties if action completed successfully
  • Token gets parameter last_action_pin_token required for CA.check_last_action_status
  • EU gets a mock check_last_action_status for compatibility

torbjornaxelsson avatar Dec 17 '22 22:12 torbjornaxelsson

Thank you for the work on this! Greatly appreciate it!

cdnninja avatar Dec 18 '22 02:12 cdnninja

Is this PR about to be implemented?

kalaws avatar Sep 15 '23 11:09 kalaws

No. The parent pr had feedback that hasn't been addressed.

cdnninja avatar Sep 18 '23 21:09 cdnninja