Skip to content

feat(P12L): confirm battery capacity 100kWh for Long Range (#326) - #328

Closed
townsmcp wants to merge 1 commit into
betafrom
feat/im5-p12l-battery-capacity
Closed

feat(P12L): confirm battery capacity 100kWh for Long Range (#326)#328
townsmcp wants to merge 1 commit into
betafrom
feat/im5-p12l-battery-capacity

Conversation

@townsmcp

Copy link
Copy Markdown
Owner

Follow-up to #327. tabannis confirmed in #326 that their IM5 is the Long Range variant (100 kWh NCM/800V pack), resolving the variant ambiguity that blocked a capacity fix.

Confirmed this round:

  • Battery: Long Range → 100 kWh. battery_capacity_kwh now corrects the same bogus totalBatteryCapacity=725 placeholder seen on EC32/AS33P/S12L (mirrors S12L's handling — display-only override, no energy correction needed).
  • No fan speed control in the app — confirms mode_select was the right scheme.
  • 16–28°C temperature range — matches what was already set, no change needed.
  • The app's "Low"/"High" buttons are one-tap max-cool/max-heat temperature presets, not a distinct wire status — so climate_mode_max_cool stays at its unconfirmed MIS3E-inherited value rather than being reassigned from this.

Still open — why this is a draft: fan_only/heat/defrost/max_cool status codes remain unconfirmed. tabannis is sending a fresh debug log captured with the AC confirmed on. This branch is left open for that follow-up commit once it arrives — will mark ready for review then.

Also fixed: the merged P12L profile in #327 was missing the fan_speed_low/medium/high keys that every other profile carries (harmless today — they're unused under mode_select, and coordinator.py falls back to .get() defaults — but added for consistency with MIS3E/MZS3E, and caught by a new full-profile-diff test in this PR).

Tests: extended TestP12LClimate with capacity assertions mirroring TestIM6BatteryCapacity, plus a diff test asserting only the deliberately-changed fields may differ from DEFAULT_VEHICLE_PROFILE (this is what caught the missing fan_speed_* keys). 137 tests total, same 2 pre-existing unrelated import-ordering failures on beta HEAD as before — no regressions.

tabannis confirmed (#326 comments) their IM5 is the Long Range variant
-- the 100 kWh NCM/800V pack -- resolving the earlier variant ambiguity
that blocked a capacity fix in #327. Also confirmed:
  - no fan speed control in the app (mode_select scheme was correct)
  - 16-28C temperature range (matches what was already set)
  - 'Low'/'High' buttons are one-tap max-cool/max-heat presets, not a
    distinct wire status -- climate_mode_max_cool stays unconfirmed
  - AC-gates-heat quirk mirrors the MGS6 (James, same thread) --
    supporting, not wire-confirmed, evidence for the inherited values

Changes:
  - battery_capacity_kwh: None -> 100.0, mirroring S12L's handling of
    the same bogus totalBatteryCapacity=725 placeholder. No
    charging_capacity_correction (display-only override, same as S12L).
  - Added fan_speed_low/medium/high (1/2/3) for consistency with other
    mode_select profiles (MIS3E/MZS3E) -- unused under mode_select
    (no FAN_MODE feature exposed) but kept as a safe, explicit default
    rather than relying on the coordinator's .get() fallback.
  - README row updated: capacity corrected, caveat narrowed to the
    still-untested 75kWh Standard Range.

Still unconfirmed and NOT changed here: fan_only/heat/defrost/max_cool
status codes. These need a debug log captured with the AC confirmed
on, which tabannis is sending separately -- this branch is left open
for that follow-up commit.

Tests: extended TestP12LClimate with capacity assertions mirroring
TestIM6BatteryCapacity, plus a full-profile diff test (only the
deliberately-changed fields may differ from DEFAULT) which caught the
missing fan_speed_* keys above. 137 tests total (2 pre-existing,
unrelated import-ordering failures on beta HEAD, same as before).
townsmcp added a commit that referenced this pull request Aug 31, 2026
Brings the battery-capacity half of #328 onto this branch so it ships in
one release; #328 stays open for the climate codes still awaiting a debug
log from tabannis.

Changed from #328 as merged: 96.5 kWh, not 100.0. Profiles store USABLE
capacity, not nominal pack size — AS33P is 23.2 against a 24.7 nominal for
exactly this reason, and every energy figure derived from capacity is
energy the owner can actually use. Published usable figures for the IM5
are 73.5 (75 nominal, Standard Range) and 96.5 (100 nominal, Long Range
and Performance). Using 100.0 would overstate every derived figure by
~3.5%.

Standard Range owners still land on the same P12L series code and will now
get a capacity that is 31% too high rather than none at all, so the README
row directs them to the capacity override until the variants can be
distinguished.

Also carried over from #328: the missing fan_speed_low/medium/high keys
and the full-profile-diff test that caught them.
@townsmcp

Copy link
Copy Markdown
Owner Author

Closing pr. merged some of the updates in latest pr. will revisit when I get the needed climate data

@townsmcp townsmcp closed this Aug 31, 2026
@townsmcp
townsmcp deleted the feat/im5-p12l-battery-capacity branch August 31, 2026 16:16
@townsmcp townsmcp mentioned this pull request Sep 1, 2026
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.

1 participant