Skip to content

Conversation

Bre77
Copy link
Contributor

@Bre77 Bre77 commented Jun 14, 2025

Proposed change

There has been a lot of comments about how hard the Tesla Fleet setup is since Tesla force me to remove the build in client ID. So many issues are raised due to issues people have with the external prerequisites, and its hard to know where exactly a user has made the mistake.

To address this, the config flow now:

  1. Performs the user OAuth flow (as before)
  2. Prompts the user for their application domain, with a link back to the Tesla Developer Dashboard where this is set
  3. Registers the domain in the users region, to checks if it has the right public key, and if not provides this in PEM format on screen. This screen will not progress until the private key and hosted public key match, eliminating an entire class of issues.
  4. Shows the Virtual Key pairing URL and QR Code

This elimates the need for users to run openssl to generate their own keys and curl or postman to regsiter their application domain. As such these have been removed from the documentation.

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

Summary by CodeRabbit

  • Documentation
    • Simplified and updated setup instructions for the Tesla Fleet integration.
    • Removed detailed steps for manual key generation and partner registration.
    • Clarified how to obtain and host the required public key during integration setup.
    • Applied minor formatting improvements for clarity.

@home-assistant
Copy link

It seems that this PR is targeted against an incorrect branch. Documentation updates which apply to our current stable release should target the current branch. Please change the target branch of this PR to current and rebase if needed. If this is documentation for a new feature, please add a link to that PR in your description.

@home-assistant home-assistant bot added in-progress This PR/Issue is currently being worked on needs-rebase The PR has been branched of the wrong base branch or targets an incorrect target branch next This PR goes into the next branch labels Jun 14, 2025
Copy link

netlify bot commented Jun 14, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit d6fe67b
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/684fab25a2e5fe0008ad170f
😎 Deploy Preview https://deploy-preview-39542--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in another repo and removed needs-rebase The PR has been branched of the wrong base branch or targets an incorrect target branch labels Jun 14, 2025
Copy link
Contributor

coderabbitai bot commented Jun 14, 2025

📝 Walkthrough

Walkthrough

The Tesla Fleet integration documentation was revised to simplify the setup process. Manual steps for generating and uploading keys and registering as a Fleet API partner were removed. Now, users receive the public key during setup and are instructed to host it as required. Some formatting and explanatory adjustments were also made.

Changes

File(s) Change Summary
source/_integrations/tesla_fleet.markdown Simplified setup instructions, removed manual key generation and partner registration steps, updated proxy configuration guidance, and made minor formatting fixes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Integration Setup
    participant Hosting Environment

    User->>Integration Setup: Start Tesla Fleet integration setup
    Integration Setup->>User: Provide public key
    User->>Hosting Environment: Save and host public key at required path
    Note over User,Integration Setup: No manual key generation or partner registration required
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
source/_integrations/tesla_fleet.markdown (3)

81-91: Add parent directory creation before writing PEM file.

Step 2 writes the public key under /share/tesla/.well-known/appspecific/... but doesn’t ensure those directories exist. Recommend prepending a mkdir -p /share/tesla/.well-known/appspecific command to avoid failures on fresh installs.


93-98: Clarify hosting prerequisites in generic key section.

The generic hosting instructions repeat the path requirement but omit directory setup and redirect warnings. Suggest calling out that users must create the /.well-known/appspecific folder on their host and ensure no HTTP redirects are in place, to prevent Tesla API errors.


142-146: Fix stray character, verb usage, and bare URL.

  • Remove the trailing “W” on line 142.
  • Change “setup” to the verb form “set up” for correct grammar.
  • Convert the bare URL on line 144 into a markdown link to satisfy lint rules, e.g.
    [https://tesla.com/_ak/YOUR.DOMAIN](https://tesla.com/_ak/YOUR.DOMAIN).
🧰 Tools
🪛 LanguageTool

[grammar] ~142-~142: Make sure that the noun ‘setup’ is correct. Did you mean the past participle “set up”?
Context: ...is is required and the key has not been setup correctly.W Your public key must be ad...

(BE_VB_OR_NN)

🪛 markdownlint-cli2 (0.17.2)

144-144: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between bc3bcc0 and 561b1c6.

📒 Files selected for processing (1)
  • source/_integrations/tesla_fleet.markdown (2 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/tesla_fleet.markdown

[grammar] ~142-~142: Make sure that the noun ‘setup’ is correct. Did you mean the past participle “set up”?
Context: ...is is required and the key has not been setup correctly.W Your public key must be ad...

(BE_VB_OR_NN)

🪛 markdownlint-cli2 (0.17.2)
source/_integrations/tesla_fleet.markdown

144-144: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - home-assistant-docs
  • GitHub Check: Header rules - home-assistant-docs
  • GitHub Check: Pages changed - home-assistant-docs

Copy link
Contributor

@c0ffeeca7 c0ffeeca7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Bre77 👍

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
source/_integrations/tesla_fleet.markdown (1)

142-145: Fix grammar and formatting in command signing section

  • Replace “has not been setup correctly.W” with “has not been set up correctly.” (remove stray “W” and correct “setup”→“set up”).
  • Convert the bare URL to a markdown link, e.g.:
    [Tesla key pairing page](https://tesla.com/_ak/YOUR.DOMAIN).
🧰 Tools
🪛 LanguageTool

[grammar] ~142-~142: Make sure that the noun ‘setup’ is correct. Did you mean the past participle “set up”?
Context: ...is is required and the key has not been setup correctly.W Your public key must be ad...

(BE_VB_OR_NN)

🪛 markdownlint-cli2 (0.17.2)

144-144: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 561b1c6 and d6fe67b.

📒 Files selected for processing (1)
  • source/_integrations/tesla_fleet.markdown (2 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/tesla_fleet.markdown

[grammar] ~142-~142: Make sure that the noun ‘setup’ is correct. Did you mean the past participle “set up”?
Context: ...is is required and the key has not been setup correctly.W Your public key must be ad...

(BE_VB_OR_NN)

🪛 markdownlint-cli2 (0.17.2)
source/_integrations/tesla_fleet.markdown

144-144: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - home-assistant-docs
  • GitHub Check: Header rules - home-assistant-docs
  • GitHub Check: Pages changed - home-assistant-docs

Comment on lines +81 to +90
{% details "Hosting a Public/Private Key Pair with the NGINX Home Assistant SSL proxy Add-on" %}

With this method, it is assumed that the [NGINX Home Assistant SSL proxy Add-on](https://github.com/home-assistant/addons/blob/master/nginx_proxy/DOCS.md) is running as a reverse proxy for external access to your Home Assistant installation.

1. **Open an SSH Terminal** on your Home Assistant installation using the [Terminal & SSH Add-on](https://www.home-assistant.io/common-tasks/os#installing-and-using-the-ssh-add-on).
2. During the integration setup, you will be provided your public key. Copy this content to a file at `/share/tesla/.well-known/appspecific/com.tesla.3p.public-key.pem`.
3. Create a **NGINX configuration file** `nginx_proxy_default_tesla.conf` in `/share` with: `echo 'location /.well-known/appspecific/com.tesla.3p.public-key.pem {\n root /share/tesla;\n}' > /share/nginx_proxy_default_tesla.conf`
4. Close the Terminal and go to **Settings** >**Add-Ons** > **NGINX Home Assistant SSL proxy** > Configuration page. Change the `customize.active` option from the default `false` to `true`. Leave the `config.default` option at its default value: `nginx_proxy_default*.conf`.
5. **Restart the NGINX Home Assistant SSL proxy Add-on** on the **Settings** > **Add-Ons** > **NGINX Home Assistant SSL proxy** > **Info** page and test if the public key file is accessible at `https://my.domain.com/.well-known/appspecific/com.tesla.3p.public-key.pem`

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Remove or update NGINX proxy hosting instructions to match simplified flow

The detailed step-by-step for the NGINX SSL proxy add-on conflicts with the new config flow where Home Assistant now provides the public key (and QR code) directly during setup. Consider moving these instructions to an optional appendix or noting they’re only needed if you cannot host the key yourself, and reference the integration’s built-in key display. Also tighten formatting (add space in **Settings** > **Add-Ons**, use fenced code blocks for the echo command, etc.).

🤖 Prompt for AI Agents
In source/_integrations/tesla_fleet.markdown around lines 81 to 90, the NGINX
proxy hosting instructions are outdated and conflict with the new simplified
integration flow where Home Assistant provides the public key and QR code
directly. Update this section by either removing the detailed step-by-step
instructions or moving them to an optional appendix with a note that they are
only necessary if the user cannot host the key themselves. Also, improve
formatting by adding spaces in "**Settings** > **Add-Ons**" and enclosing the
echo command in fenced code blocks for clarity.

@c0ffeeca7 c0ffeeca7 added the awaits-parent Awaits the merge of an parent PR label Jun 16, 2025
@home-assistant home-assistant bot added the parent-merged The parent PR has been merged already label Jun 16, 2025
@silamon silamon merged commit 7ec1c7c into home-assistant:next Jun 16, 2025
7 checks passed
@home-assistant home-assistant bot removed parent-merged The parent PR has been merged already in-progress This PR/Issue is currently being worked on awaits-parent Awaits the merge of an parent PR labels Jun 16, 2025
@Bre77
Copy link
Contributor Author

Bre77 commented Jun 16, 2025

This is going to merge conflict hard at release time

@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has-parent This PR has a parent PR in another repo next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants