Skip to content

Add Bluetooth open_rear_trunk and close_rear_trunk - #191

Merged
Bre77 merged 1 commit into
mainfrom
fm/tfa-ble-trunk-open-close-build
Oct 21, 2026
Merged

Bre77 merged 1 commit into
mainfrom
fm/tfa-ble-trunk-open-close-build

Conversation

@Bre77

@Bre77 Bre77 commented Oct 21, 2026

Copy link
Copy Markdown
Member

Summary

Adds two Bluetooth-only vehicle commands on VehicleBluetooth:

  • open_rear_trunk() sends a VCSEC ClosureMoveRequest with rearTrunk=CLOSURE_MOVE_TYPE_OPEN.
  • close_rear_trunk() sends a VCSEC ClosureMoveRequest with rearTrunk=CLOSURE_MOVE_TYPE_CLOSE.

They follow the existing individual-door commands (open_front_driver_door() and the others). The existing actuate_trunk(Trunk.REAR) sends CLOSURE_MOVE_TYPE_MOVE, which toggles the trunk; these new commands give a result that does not depend on the current trunk state. Home Assistant fork PR Teslemetry/home-assistant#62 needs them.

Tests

  • tests/test_ble_mocked_closures_locks.py: the per-field closure test now covers both commands. It checks that each one sets only rearTrunk with the expected move type on the VCSEC domain.
  • pyright tesla_fleet_api: 0 errors. ruff check: clean.

No commands were sent to a real vehicle.

Docs

docs/bluetooth_vehicles.md gets a short "Open/Close Rear Trunk" section.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Teslemetry/coderabbit/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 6a49cd3f-7975-48eb-bdf7-aab2d730a588
📥 Commits

Reviewing files that changed from the base of the PR and between 187a108 and f4ad7c3.

📒 Files selected for processing: 3
  • docs/bluetooth_vehicles.md
  • tesla_fleet_api/tesla/vehicle/bluetooth.py
  • tests/test_ble_mocked_closures_locks.py

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 6 reviews per hour.

📝 Walkthrough

Added explicit Bluetooth commands to open and close the rear trunk. The documentation distinguishes these commands from the state-dependent toggle and describes how to confirm closure. Tests verify that each command sets only its designated closure field.

Changes: Rear-trunk control

Layer / File(s) Summary
Explicit rear-trunk commands
tesla_fleet_api/tesla/vehicle/bluetooth.py, tests/test_ble_mocked_closures_locks.py, docs/bluetooth_vehicles.md
VehicleBluetooth now sends explicit rear-trunk OPEN and CLOSE requests. Tests check that each request sets only the corresponding closure field. Documentation contrasts these commands with actuate_trunk(Trunk.REAR) and describes how to confirm closure.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to f4ad7

The explicit rear-trunk commands are correctly wired and documented; no merge-blocking issue is identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the two Bluetooth rear-trunk commands added by the pull request.
Description check Passed The description accurately explains the new commands, their VCSEC behavior, tests, validation, and documentation changes.
Docstring Coverage Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (1 skipped: 1 u…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
📝 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.

@Bre77
Bre77 merged commit adb93d4 into main Oct 21, 2026
7 checks passed
@Bre77
Bre77 deleted the fm/tfa-ble-trunk-open-close-build branch October 21, 2026 10:41
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