Skip to content

Document required manual inputs for ESPHome new entry config flow #38612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 18, 2025

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Apr 17, 2025

Proposed change

Add docs for the required manual inputs for ESPHome

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

  • Link to parent pull request in the codebase:
  • Link to parent pull request in the Brands repository:
  • This PR fixes or closes issue: fixes #

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

  • Documentation
    • Added a new section detailing required manual input parameters for configuring ESPHome devices, including explanations for host, port, noise_psk, and password.
    • Provided a reference link to the official ESPHome Native API Component documentation for further information.

@home-assistant home-assistant bot added the current This PR goes into the current branch label Apr 17, 2025
Copy link

netlify bot commented Apr 17, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 6d6d493
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/680198f43682b800081e4640
😎 Deploy Preview https://deploy-preview-38612--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 site configuration.

Copy link
Contributor

coderabbitai bot commented Apr 17, 2025

Warning

Rate limit exceeded

@bdraco has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 45 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3aae5d1 and 6d6d493.

📒 Files selected for processing (1)
  • source/_integrations/esphome.markdown (1 hunks)
📝 Walkthrough

Walkthrough

The documentation for the ESPHome integration was updated by adding a new section called "Required manual input." This section outlines the configuration parameters that must be manually provided when setting up an ESPHome device, including detailed descriptions for each parameter and a reference link to the official ESPHome Native API documentation. No changes were made to the codebase or public interfaces.

Changes

File(s) Change Summary
source/_integrations/esphome.markdown Added a "Required manual input" section detailing required configuration parameters and references

Sequence Diagram(s)

No sequence diagram is generated since the changes are limited to documentation updates.


🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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 (5)
source/_integrations/esphome.markdown (5)

53-54: Consistent section heading formatting
The heading “Required manual Input” uses inconsistent capitalization. It would be clearer and more consistent with other Home Assistant docs to use either title case or sentence case, and recommend pluralizing if multiple entries are required.

- ### Required manual Input
+ ### Required manual inputs

55-57: Use active voice for the introductory sentence
The phrase “The configuration of an ESPHome device requires you to…” is wordy. A more direct, active-voice construction will improve readability.

- The configuration of an ESPHome device requires you to enter the following information:
+ To configure an ESPHome device, enter the following information:

59-62: Mention the default API port for clarity
Readers may not know the default port for the ESPHome native API. Including it here will save them a lookup.

 host:
   description: "IP address or hostname of the ESPHome device. <br> This will be pre-filled if the device was auto-discovered."
-port:
-  description: "Port used by the ESPHome native API. <br> This will be pre-filled if the device was auto-discovered."
+port:
+  description: "Port used by the ESPHome native API (default: 6053). <br> This will be pre-filled if the device was auto-discovered."

63-64: Link to noise PSK generation documentation
It may not be obvious how to generate or retrieve a 32‑byte base64 Noise PSK. Consider linking to ESPHome’s encryption guide for end-to-end clarity.

-noise_psk:
-  description: "The pre-shared key used for encryption. <br> This is a 32-byte base64-encoded string. Leave this blank if native encryption is not enabled."
+noise_psk:
+  description: "The pre-shared key used for encryption. <br> This is a 32‑byte base64‑encoded string. Leave blank if native encryption is not enabled. See [Noise encryption in ESPHome](https://esphome.io/guides/security.html#noise-encryption) for more details."

65-66: Clarify deprecation of the password field
The current note is helpful but could be streamlined. You might also indicate the version when password support will be removed, if known.

-password:
-  description: "Device password. <br> Note: Passwords are deprecated—use encryption keys instead."
+password:
+  description: "Device password (deprecated). <br> Use a Noise PSK (encryption key) instead – password support will be removed in a future release."
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 67bd213 and 0e81923.

📒 Files selected for processing (1)
  • source/_integrations/esphome.markdown (1 hunks)
⏰ 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

@bdraco
Copy link
Member Author

bdraco commented Apr 18, 2025

@coderabbitai please provide commitable inline suggestion comments for the nitpick comments

Copy link
Contributor

coderabbitai bot commented Apr 18, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get the file that was modified in this PR
gh pr view 38612 --json files --jq '.files[].path'

# Get all review comments on this PR
gh pr view 38612 --json reviews --jq '.reviews[].comments[].body'

# Get the PR diff to see the context around the changes
gh pr view 38612 --json files --jq '.files[].patch'

# Get the current content of the file to create accurate suggestions
gh pr view 38612 --json files --jq '.files[].patch' | grep "^+" | sed 's/^+//' > current_content.txt
cat current_content.txt

Length of output: 346


🏁 Script executed:

#!/bin/bash
# Get the content of the modified file
gh pr checkout 38612
cat source/_integrations/esphome.markdown

# Get the PR diff using git diff command for better visibility
git diff --staged

# Get the PR description to see if there are any nitpick comments there
gh pr view 38612 --json body --jq '.body'

# Check if there were any review comments on any commit in the PR
gh pr view 38612 --json comments --jq '.comments[].body'

Length of output: 14916


🏁 Script executed:

#!/bin/bash
# First, try to get the PR diff which will show exactly what changes were made
gh pr diff 38612

# Then, let's check if there were any inline comments on the PR (different endpoint)
gh api repos/home-assistant/home-assistant.io/pulls/38612/comments

Length of output: 6738


@bdraco I've found your existing nitpick comments on the PR, and here are additional committable inline suggestions for other potential improvements:

For the host description:

  description: "IP address or hostname of the ESPHome device.<br>This will be pre-filled if the device was auto-discovered."

For the port description:

  description: "Port used by the ESPHome native API.<br>This will be pre-filled if the device was auto-discovered."

For the noise_psk description:

  description: "The pre-shared key used for encryption.<br>This is a 32-byte base64-encoded string. Leave this blank if native encryption is not enabled."

For the password description:

  description: "Device password.<br>Note: Passwords are deprecated—use encryption keys instead."

These suggestions remove the space after <br> tags for consistent formatting throughout the document. Let me know if you'd like any other specific formatting improvements!

@bdraco
Copy link
Member Author

bdraco commented Apr 18, 2025

@coderabbitai I asked for commitable suggestions.

They should use the github suggestion formatting

Copy link
Contributor

coderabbitai bot commented Apr 18, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@bdraco I understand now - here are the properly formatted GitHub committable suggestions:

For the host description:

  description: "IP address or hostname of the ESPHome device.<br>This will be pre-filled if the device was auto-discovered."

For the port description:

  description: "Port used by the ESPHome native API.<br>This will be pre-filled if the device was auto-discovered."

For the noise_psk description:

  description: "The pre-shared key used for encryption.<br>This is a 32-byte base64-encoded string. Leave this blank if native encryption is not enabled."

For the password description:

  description: "Device password.<br>Note: Passwords are deprecated—use encryption keys instead."

These suggestions remove the space after <br> tags for consistent formatting throughout the document.


🏁 Script executed:

#!/bin/bash
# Get the exact content of the modified file in the PR
gh pr checkout 38612
cat source/_integrations/esphome.markdown

# Show the specific changes made in this PR
gh pr diff 38612 | grep -A 20 "Required manual input"

Length of output: 5259


@bdraco Looking at the diff, I see exactly what needs fixing. Here are the properly formatted GitHub committable suggestions for each parameter:

For the host description:

  description: "IP address or hostname of the ESPHome device.<br>This will be pre-filled if the device was auto-discovered."

For the port description:

  description: "Port used by the ESPHome native API.<br>This will be pre-filled if the device was auto-discovered."

For the noise_psk description:

  description: "The pre-shared key used for encryption.<br>This is a 32-byte base64-encoded string. Leave this blank if native encryption is not enabled."

For the password description:

  description: "Device password.<br>Note: Passwords are deprecated—use encryption keys instead."

These suggestions remove the spaces after the <br> tags to maintain consistent formatting throughout the documentation.

@bdraco bdraco changed the title Document required manual imports for ESPHome new entry config flow Document required manual inputs for ESPHome new entry config flow Apr 18, 2025
@bdraco
Copy link
Member Author

bdraco commented Apr 18, 2025

Thanks. Will fix conflicts on the others after merging this

@bdraco bdraco merged commit fa78a9c into current Apr 18, 2025
9 checks passed
@bdraco bdraco deleted the bdraco-patch-11 branch April 18, 2025 08:09
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
current This PR goes into the current branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants