Repository navigation
Conversation
control_ventilated_seat(vin, seat=VentilatedSeat.X, level=0-3) sets one seat per command, front or rear: request type 22, a single parameter (27 front left, 28 front right, 29 rear left, 30 rear right), then PARAMS_MAX. BasicVehicleStatus gets frontLeft/frontRight/secondRowLeft/secondRowRight SeatVentLevel. Based on static analysis of the iSmart app, not checked on a car.
This branch has not been deployed
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 #35. Part of #26.
Adds
control_ventilated_seat(vin, *, seat: VentilatedSeat, level: int), which sets one ventilated seat per command, front or rear. It mirrorscontrol_heated_seat.What it sends
rvcReqType22 (newRvcReqType.VENTILATED_SEATS).VentilatedSeat.FRONT_LEFTVentilatedSeat.FRONT_RIGHTVentilatedSeat.REAR_LEFTVentilatedSeat.REAR_RIGHTONE_LEVEL_VENTILATED_SEAT_ON_LEVEL(3) for on. Levels outside 0-3 raiseValueError.BasicVehicleStatusgainsfrontLeftSeatVentLevel,frontRightSeatVentLevel,secondRowLeftSeatVentLevelandsecondRowRightSeatVentLevel. They default toNone, so cars without ventilated seats are unaffected.Draft: not tested on a car
The values come from static analysis of the iSmart app, not from a capture. This PR has not been checked on a car. Things only a car can settle:
Please test on a car with ventilated seats (the issue reporter's MG S6?) before this is marked ready.
Changes
api/vehicle/schema.py: fourRvcParamsIdvalues,RvcReqType.VENTILATED_SEATSand four status fieldsapi/vehicle/climate/schema.py:VentilatedSeatandONE_LEVEL_VENTILATED_SEAT_ON_LEVELapi/vehicle/climate/__init__.py:control_ventilated_seat()tests/test_ventilated_seats.py: every seat and level byte for byte, the one-level on value, the range check and the status parsingREADME.md: feature list lineruff, mypy and pytest pass locally on Python 3.13.
https://claude.ai/code/session_013xKSpu8ev4cxQNsitcCidm