Repository navigation
feat: rear heated seats and per-seat heated seat control (#34) - #50
Merged
Merged
Conversation
…-API#34) - control_heated_seat(vin, seat=HeatedSeat.X, level=0-3): one seat per command, front or rear, as the iSmart app sends it on an MG S6 EV (request type 5, a single parameter 17/18/25/26, no end-of-parameters marker). Rear seats are on/off only; REAR_HEATED_SEAT_ON_LEVEL = 3 is what the app sends for on. control_heated_seats (both fronts together) is unchanged. - BasicVehicleStatus: secondRowLeftSeatHeatLevel and secondRowRightSeatHeatLevel, which the MG S6 EV sends and were dropped.
nanomad
force-pushed
the
feat/rear-heated-seats
branch
from
October 25, 2026 14:52
112d42b to
aa2daa5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #34. Part of #26.
What it adds
control_heated_seat(vin, *, seat: HeatedSeat, level: int)sets one seat per command, front or rear, as the iSmart app does on an MG S6 EV (UK account, EU servers), from decrypted app traffic:rvcReqType5, with a single parameter for the chosen seat and no end-of-parameters marker:HeatedSeat.FRONT_LEFTHeatedSeat.FRONT_RIGHTHeatedSeat.REAR_LEFTRvcParamsId.HEATED_SEAT_REAR_LEFT)HeatedSeat.REAR_RIGHTRvcParamsId.HEATED_SEAT_REAR_RIGHT)REAR_HEATED_SEAT_ON_LEVEL = 3is what the app sends for on; 0 is off.ValueError.The existing
control_heated_seats(both front seats in one command) is unchanged.Rear seat status:
BasicVehicleStatusgainssecondRowLeftSeatHeatLevelandsecondRowRightSeatHeatLevel. The MG S6 EV sends them, but they were dropped because the dataclass had no fields for them. Both default toNone, so cars that don't send them are unaffected.We've been using these in mg-saic-ha on an MG S6 EV since September.
Changes
api/vehicle/schema.py: the twoRvcParamsIdvalues and the two status fieldsapi/vehicle/climate/schema.py(new):HeatedSeatandREAR_HEATED_SEAT_ON_LEVELapi/vehicle/climate/__init__.py:control_heated_seat()tests/test_heated_seats.py: every seat and level checked byte for byte, the rear "on" level, and the range checktests/test_vehicle_status_rear_seats.py: the rear seat levels are parsed, and stayNonewhen absentREADME.md: feature list line updatedruff (check and format), mypy, pylint and pytest all pass locally on Python 3.13.
The front-seat naming fix (17/18 are the physical left/right seats on both LHD and RHD cars, not driver/passenger) will follow as its own PR.