feat(vehicle): add remaining BLE vehicle-data readers + coverage-lock test#97
Merged
Conversation
added 2 commits
July 23, 2026 08:48
… test Wraps the 7 missing GetVehicleData sub-states with no BLE reader today: gui_settings, parked_accessory_state, legacy_vehicle_state, alert_state, light_show_state, suspension_state, child_presence_detection_state, and wires each into vehicle_data()'s endpoints dispatch. CarServer's GetVehicleState reply field is named legacy_vehicle_state on VehicleData, so the new reader takes that name rather than vehicle_state(), which already reads the unrelated VCSEC VehicleStatus. Adds a coverage-lock test that walks the VehicleAction/GetVehicleData proto descriptors and asserts every field is wrapped or on a short, reasoned allowlist (the streaming/subscription family and the chunked image-transfer sub-state, both needing their own design), so a future tesla-protocol bump can't silently drift the library out of full coverage. getVehicleImageState (chunked binary transfer) and the 7 subscription/streaming VehicleAction fields are out of scope here - they need their own persistent-broadcast/session design, not a one-shot wrapper.
Records the coverage-lock test's purpose and allowlists, the legacy_vehicle_state() naming decision, and why the niche/rate-tariff commands are shaped the way they are, for future agents touching this surface.
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.
Intent
GetVehicleDatasub-states with no BLE reader today, and adds a test that locks the wholeVehicleAction/GetVehicleDataproto surface in place.VehicleBluetooth(tesla_fleet_api/tesla/vehicle/bluetooth.py), following the existing single-sub-state reader pattern:gui_settings,parked_accessory_state,legacy_vehicle_state,alert_state,light_show_state,suspension_state,child_presence_detection_state. Each is wired intovehicle_data()'sendpointsdispatch alongside the existing 12.GetVehicleStatesub-state is exposed aslegacy_vehicle_state(), matching the reply field name onVehicleData(legacy_vehicle_state), notvehicle_state()- that name is already taken by the existing VCSECVehicleStatusreader, a different message from a different domain. This is new public API and can't be renamed later without a breaking change, so flagging it explicitly here.tests/test_proto_coverage_lock.py) that walks theVehicleAction/GetVehicleDataproto descriptors and asserts every field is wrapped incommands.py/bluetooth.py, or is on one of two small, reasoned allowlists (the push-style subscription/streaming family, and the chunkedgetVehicleImageStatebinary transfer - both need their own design, out of scope here). Passes now that every other command PR has landed; a futuretesla-protocolbump that adds a new field will fail this test instead of silently drifting the library out of full coverage.tests/test_ble_mocked_state_readers_new.pycover each new reader decoding a cannedVehicleDatareply, plus thevehicle_data()dispatch wiring.