Skip to content

Abort Teslemetry local vehicle flow with no_vehicles when only unsupported vehicles remain - #42

Closed
Bre77 wants to merge 1 commit into
devfrom
fm/teslemetry-unsupported-abort-reason
Closed

Bre77 wants to merge 1 commit into
devfrom
fm/teslemetry-unsupported-abort-reason

Conversation

@Bre77

@Bre77 Bre77 commented Oct 6, 2026

Copy link
Copy Markdown
Member

Breaking change

Proposed change

Dev has been red since home-assistant#184216 and home-assistant#184223 merged together: the local vehicle add flow chose all_vehicles_added whenever the account had any vehicle and none was selectable, so an account whose only vehicles lack command protocol support (hidden by home-assistant#184223) was told they were all added. The flow now aborts with all_vehicles_added only when a supported vehicle exists and every supported one is already added, and with no_vehicles otherwise, which is what test_subentry_add_flow_only_unsupported_vehicles expects.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

@coderabbitai

coderabbitai Bot commented Oct 6, 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: Advanced
  • Run ID: 23594415-00cc-4ebf-9975-20bcdea5d1a6
📥 Commits

Reviewing files that changed from the base of the PR and between c571d9d and 43c32d4.

📒 Files selected for processing (1)
  • homeassistant/components/teslemetry/config_flow.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Teslemetry vehicle selection flow now excludes vehicles explicitly marked as non-proxy, removes already-added VINs, and selects an abort reason based on whether supported vehicles exist.

Changes

Vehicle selection flow

Layer / File(s) Summary
Filter vehicles and choose abort reason
homeassistant/components/teslemetry/config_flow.py
The flow excludes vehicles marked proxy=False and filters out already-added VINs. If no choices remain, it reports all_vehicles_added when supported vehicles exist, or no_vehicles when none exist.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: frenck

Merge Risk: ⚪ Minimal · up to 43c32

The vehicle flow distinguishes unsupported vehicles from supported vehicles that are already added. No material merge risk was identified; proceed with normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
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.
Title check ✅ Passed The title clearly describes the change to the Teslemetry local vehicle flow and its no_vehicles abort reason. It is specific, though somewhat long.
Description check ✅ Passed The description explains the bug, the intended abort behavior, and the test associated with the change. It is directly related to the changeset.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@Bre77
Bre77 changed the base branch from dev to fm/tmp-base-1007 October 6, 2026 17:23
@Bre77
Bre77 changed the base branch from fm/tmp-base-1007 to dev October 6, 2026 17:23
@Bre77
Bre77 marked this pull request as ready for review October 6, 2026 17:33
@Bre77

Bre77 commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Firstmate: superseded by upstream home-assistant#184521 (frenck), which fixed the same dev test failure and is merged.

@Bre77 Bre77 closed this Oct 6, 2026
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