Repository navigation
Add Teslemetry open_rear_trunk and close_rear_trunk - #195
Conversation
Map them to closure(rear_trunk=OPEN/CLOSE) with the same names as VehicleBluetooth, so VehicleRouter fails over from Bluetooth to the cloud.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Rear-trunk closure commands tesla_fleet_api/teslemetry/vehicle.py, tests/test_teslemetry_vehicle_custom_commands.py |
The new methods delegate to closure() with the open or close state. Tests check the request values and verify that closing uses BLE when successful and falls back to a cloud request on ConnectionError. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Feature
Merge Risk: 
Minimal · up to 0d651
-
No merge-blocking risk is identified for the rear-trunk commands.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Summary
TeslemetryVehicle.open_rear_trunk()andclose_rear_trunk(). They callclosure(rear_trunk=ClosureState.OPEN/CLOSE)(custom_command/closure, body{"rearTrunk": "open"|"close"}).dict[str, Any]return matchVehicleBluetooth.open_rear_trunk()/close_rear_trunk()(Add Bluetooth open_rear_trunk and close_rear_trunk #191).VehicleRouterroutes any method that both backends have, so a Bluetooth-paired car out of range now fails over to the cloud. No router change was needed.open_tonneau/close_tonneau.Tests
tests/test_teslemetry_vehicle_custom_commands.py: request shape for both methods, and a router test (Bluetooth success skips the cloud; Bluetooth failure fails over to the cloud with therearTrunk: closerequest). 45 passed. ruff check and pyright clean.No release in this PR.