Skip to content

fix: AC/DC charge limit settings not working on newer Gen3 vehicles - #983

Draft
killerbee84 wants to merge 5 commits into
Hyundai-Kia-Connect:masterfrom
killerbee84:feature/fix-ac-limit
Draft

fix: AC/DC charge limit settings not working on newer Gen3 vehicles#983
killerbee84 wants to merge 5 commits into
Hyundai-Kia-Connect:masterfrom
killerbee84:feature/fix-ac-limit

Conversation

@killerbee84

@killerbee84 killerbee84 commented Dec 29, 2025

Copy link
Copy Markdown
Contributor

This fixes the AC and DC charge limit settings on Gen3 vehicles like the IONIQ 9.
Currently, changing the limits inside HA does not work.

@killerbee84 killerbee84 changed the title Feature/fix ac limit Fix: AC/DC charge limit settings not working on newer Gen3 vehicules Dec 29, 2025
@killerbee84 killerbee84 changed the title Fix: AC/DC charge limit settings not working on newer Gen3 vehicules Fix: AC/DC charge limit settings not working on newer Gen3 vehicles Dec 29, 2025
@killerbee84 killerbee84 changed the title Fix: AC/DC charge limit settings not working on newer Gen3 vehicles fix: AC/DC charge limit settings not working on newer Gen3 vehicles Dec 29, 2025
Comment thread hyundai_kia_connect_api/Vehicle.py Outdated
enabled: bool = True

# Generation type (e.g. "G3")
gen_type: str = None

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use generation two fields up for this.

@cdnninja cdnninja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like pre-commits are failing.

@cdnninja
cdnninja marked this pull request as draft January 11, 2026 00:43
@killerbee84
killerbee84 requested a review from cdnninja January 12, 2026 21:37
@killerbee84

Copy link
Copy Markdown
Contributor Author

I can't fix the pre-commit issue. The API path is "v2/ev/reserv/socset" and pre-commit is complaining about the "reserv".

@cdnninja

Copy link
Copy Markdown
Collaborator

I think you can exempt it from code spell. If we merge as is it will fail forever so needs fixing. I also updated the branch, test snapshots need to be updated.

@cdnninja

Copy link
Copy Markdown
Collaborator

Some of this was actually my recent PR by pytest snapshot update isn't working...ugh.

@cdnninja

cdnninja commented May 8, 2026

Copy link
Copy Markdown
Collaborator

I think you can exempt it from code spell. If we merge as is it will fail forever so needs fixing. I also updated the branch, test snapshots need to be updated.

I wanted to follow up if you could fix codespell? If interested in having this merged still.

@blka

blka commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

I looked at this PR and see a few issues that need resolving before it can merge:

  1. Type conflict on generation — USA uses generation: int (values 2, 3 from vehicleGeneration), this PR assigns genType (string "G3") to the same field. typing.Union[int, str] is a workaround, not a clean solution. Better options:

    • Add a separate gen_type: str field for CA/AU string-based generation identifiers
    • Or map "G3" → 3 to keep int, but we'd need to know the full set of values (G1? G2?)
  2. No CA response data with genType — There are no test fixtures or sample responses confirming that genType actually exists in the CA API vehicle list response. Before changing the type, we need a real API response showing this field.

  3. Codespellreserv in the URL path v2/ev/reserv/socset triggers codespell. Add reserv to --ignore-words-list in .pre-commit-config.yaml alongside the existing fro,hass,fatc.

  4. Hardcoded Refererset_charge_limits has Referer: https://kiaconnect.ca/remote/ hardcoded, but KiaUvoApiCA serves Kia, Hyundai, and Genesis with different BASE_URLs. Should use f"https://{self.BASE_URL}/remote/".

  5. Snapshot tests — Adding genType to get_vehicles will change Vehicle init and require pytest --snapshot-update.

Happy to pick this up and implement it properly if someone can provide a CA API vehicle list response confirming the genType field.

@cdnninja

cdnninja commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@killerbee84 any update on this?

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

Successfully merging this pull request may close these issues.

3 participants