Skip to content

fix: parse targetSOC from force refresh response for USA Kia API - #1

Draft
kingpanther13 wants to merge 3 commits into
masterfrom
claude/investigate-target-soc-pmHFW
Draft

fix: parse targetSOC from force refresh response for USA Kia API#1
kingpanther13 wants to merge 3 commits into
masterfrom
claude/investigate-target-soc-pmHFW

Conversation

@kingpanther13

Copy link
Copy Markdown
Owner

Root cause: The cmm/gvi (cached state) endpoint does NOT include targetSOC data for some vehicles (confirmed with 2020 Kia Niro EV). The rems/rvs (force refresh) endpoint DOES include it. Previously, the force refresh response was discarded without parsing targetSOC, so ev_charge_limits_ac/dc were always None for affected vehicles.

Changes:

  • force_refresh_vehicle_state now captures the rems/rvs response and parses targetSOC from it via _update_charge_limits_from_force_refresh
  • _update_vehicle_properties no longer overwrites existing charge limit values with None when the cached response lacks targetSOC
  • Added unit tests using real API response data from a 2020 Kia Niro EV

claude and others added 3 commits January 31, 2026 00:34
Root cause: The cmm/gvi (cached state) endpoint does NOT include
targetSOC data for some vehicles (confirmed with 2020 Kia Niro EV).
The rems/rvs (force refresh) endpoint DOES include it. Previously,
the force refresh response was discarded without parsing targetSOC,
so ev_charge_limits_ac/dc were always None for affected vehicles.

Changes:
- force_refresh_vehicle_state now captures the rems/rvs response and
  parses targetSOC from it via _update_charge_limits_from_force_refresh
- _update_vehicle_properties no longer overwrites existing charge limit
  values with None when the cached response lacks targetSOC
- Added unit tests using real API response data from a 2020 Kia Niro EV

https://claude.ai/code/session_01K2NA2hvdoY3HMq8NiZDveZ
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.

2 participants