Skip to content

Add troubleshooting section to ESPHome #38615

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 5 commits into from
Apr 18, 2025
Merged

Add troubleshooting section to ESPHome #38615

merged 5 commits into from
Apr 18, 2025

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Apr 18, 2025

Proposed change

Add troubleshooting section to ESPHome

required for quality scale

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
    • Expanded and renamed the "Obtaining logs from the device" section to "Troubleshooting."
    • Added a "Viewing Live Logs" subsection with step-by-step instructions for accessing live logs via the ESPHome Device Builder Add-on and CLI.
    • Clarified and reorganized information on obtaining device logs and adjusting logging levels.

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

netlify bot commented Apr 18, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 08c9cb9
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/68020c02de37a500085453c6
😎 Deploy Preview https://deploy-preview-38615--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 18, 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 2 minutes and 19 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 a6d26cd and 08c9cb9.

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

Walkthrough

The documentation for ESPHome integration has been updated by expanding the section on device logs into a broader "Troubleshooting" section. This new section now includes a dedicated subsection for "Viewing Live Logs," detailing how to access live logs using both the ESPHome Device Builder Add-on and the ESPHome CLI, with a reference link to the CLI documentation. The original instructions for obtaining logs via Home Assistant have been moved under a new subsection, and explanations about adjusting logging levels have been retained with minor formatting improvements.

Changes

File(s) Change Summary
source/_integrations/esphome.markdown Expanded and renamed the device logs section to "Troubleshooting," added subsections for live log viewing and clarified log subscription methods, with improved structure and references.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HomeAssistant
    participant ESPHomeAddOn
    participant ESPHomeCLI
    participant Device

    User->>ESPHomeAddOn: Request live logs
    ESPHomeAddOn->>Device: Connect and stream logs
    Device-->>ESPHomeAddOn: Send live log data
    ESPHomeAddOn-->>User: Display live logs

    User->>ESPHomeCLI: Run logs command
    ESPHomeCLI->>Device: Connect and stream logs
    Device-->>ESPHomeCLI: Send live log data
    ESPHomeCLI-->>User: Display live logs

    User->>HomeAssistant: Enable log subscription
    HomeAssistant->>Device: Subscribe to logs
    Device-->>HomeAssistant: Send logs (without active monitoring)
    HomeAssistant-->>User: Make logs available
Loading

🪧 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)

105-106: ⚙️ Use sentence case for the subheading

For consistency with other headings (e.g., “Home Assistant actions”), convert to sentence case:

-### Viewing Live Logs
+### Viewing live logs

109-112: ⚙️ Remove trailing punctuation and add spacing before the list

Markdown lint flags the trailing colon on the heading and requires a blank line between a heading and its list. Adjust as follows:

-#### Using the **ESPHome Device Builder Add-on**:
+#### Using the **ESPHome Device Builder add-on**

 1. In the **ESPHome Device Builder** add-on, find the device you're working with.
 2. Click the **LOGS** button to open the log view.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

109-109: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


109-109: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


110-110: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


113-115: ⚙️ Remove trailing punctuation and ensure spacing

Similarly, update the CLI subsection heading:

-#### Using the **ESPHome CLI**:
+#### Using the **ESPHome CLI**

 If you're using the **ESPHome CLI**, follow the instructions for the [logs Command](https://esphome.io/guides/cli.html#logs-command) to access the logs.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

113-113: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


113-113: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


116-117: ⚙️ Use sentence case for this subheading

Align with sentence‑case style for headings:

-### Obtaining Logs from the Device
+### Obtaining logs from the device

124-126: 🐞 Fix inconsistent internal link

The logger action link is missing the /docs prefix. For consistency with other doc links, update like so:

- or use the [Developer Tools](/docs/tools/dev-tools/#actions-tab) to call the [`logger.set_level`](/integrations/logger/#action-set_level) action to specify the desired level:
+ or use the [Developer Tools](/docs/tools/dev-tools/#actions-tab) to call the [logger.set_level action](/docs/integrations/logger/#action-set_level) to specify the desired level:
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e840840 and 95e170a.

📒 Files selected for processing (1)
  • source/_integrations/esphome.markdown (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/esphome.markdown

109-109: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


109-109: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


110-110: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


113-113: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


113-113: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

⏰ 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
🔇 Additional comments (2)
source/_integrations/esphome.markdown (2)

103-104: ✅ Approve addition of the Troubleshooting section

The new “## Troubleshooting” section cleanly introduces the new content and is well‑placed following existing examples.


120-122: 🔍 Verify the options flow anchor

Please confirm that the link [options flow](#options) correctly targets the options‑flow section in this document (it may actually be #options-flow or another automatically generated anchor).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

120-120: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


120-120: Link fragments should be valid
null

(MD051, link-fragments)

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

109-112: Fix markdown heading and list formatting
According to markdownlint (MD022, MD026, MD032), this heading should not end with a colon and must be surrounded by blank lines, with the list similarly padded. Please apply:

-#### Using the [**ESPHome Device Builder Add-on**](https://my.home-assistant.io/redirect/supervisor_addon/?addon=5c53de3b_esphome&repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon):
+#### Using the [**ESPHome Device Builder Add-on**](https://my.home-assistant.io/redirect/supervisor_addon/?addon=5c53de3b_esphome&repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon)

 1. In the [**ESPHome Device Builder Add-on**](https://my.home-assistant.io/redirect/supervisor_addon/?addon=5c53de3b_esphome&repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon) add-on, find the device you're working with.
 2. Click the **LOGS** button to open the log view.
+
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

109-109: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


109-109: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


110-110: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


113-115: Remove trailing punctuation and add blank line after heading
This heading ends with a colon and isn’t surrounded by blank lines. Update to:

-#### Using the **ESPHome CLI**:
+#### Using the **ESPHome CLI**

 If you're using the **ESPHome CLI**, follow the instructions for the [logs Command](https://esphome.io/guides/cli.html#logs-command) to access the logs.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

113-113: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


113-113: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 95e170a and d45ae73.

📒 Files selected for processing (1)
  • source/_integrations/esphome.markdown (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/esphome.markdown

109-109: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


109-109: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


110-110: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


113-113: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


113-113: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

⏰ 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
🔇 Additional comments (4)
source/_integrations/esphome.markdown (4)

103-108: Well-structured introduction to the new Troubleshooting section
The new "Troubleshooting" section and its "Viewing Live Logs" overview are clear, concise, and correctly integrated into the documentation.


116-119: No changes needed in this section.


120-122: Verify internal link anchor
The link to the options flow uses #options. Please confirm that this matches the generated ID of the "Options" section in the rendered HTML to prevent broken links.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

120-120: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


120-120: Link fragments should be valid
null

(MD051, link-fragments)


123-132: No changes needed in this section.

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

130-133: Refine heading formatting. To satisfy markdownlint rules (MD022, MD026), remove the trailing colon from this subheading and ensure there’s a blank line before and after it. For example:

-#### Using the [**ESPHome Device Builder Add-on**]:
+#### Using the [**ESPHome Device Builder Add‑on**]
 
 1. In the [**ESPHome Device Builder Add‑on**]...
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

130-130: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


130-130: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


131-131: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


134-136: Refine heading formatting for CLI subsection. Apply the same markdownlint fixes here by removing the trailing colon and adding blank lines around the heading:

-#### Using the **ESPHome CLI**:
+#### Using the **ESPHome CLI**
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

134-134: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


134-134: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


135-136: Consider adding a CLI usage example. To make the CLI instructions more actionable, include a sample command such as:

esphome logs <path-to-config>.yaml

144-152: Ensure proper markdown nesting and spacing. For better readability and to satisfy markdownlint (MD032), indent nested list items with four spaces and add a blank line before the YAML code block. For example:

-2. To adjust the logging level, there are two options:
-    - enable [debug logging](/docs/configuration/troubleshooting/#debug-logs-and-diagnostics),
-    - or use the [Developer Tools](/docs/tools/dev-tools/#actions-tab) to call the [`logger.set_level`](/integrations/logger/#action-set_level) action to specify the desired level:
-
-      ```yaml
-      action: logger.set_level
-      data:
-        homeassistant.components.esphome: debug
-      ```
+2. To adjust the logging level, there are two options:
+    - enable [debug logging](/docs/configuration/troubleshooting/#debug-logs-and-diagnostics)
+    - use the [Developer Tools](/docs/tools/dev-tools/#actions-tab) to call the [`logger.set_level`](/integrations/logger/#action-set_level) action
+
+        ```yaml
+        action: logger.set_level
+        data:
+          homeassistant.components.esphome: debug
+        ```
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d45ae73 and a6d26cd.

📒 Files selected for processing (1)
  • source/_integrations/esphome.markdown (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/esphome.markdown

130-130: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


130-130: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


131-131: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


134-134: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


134-134: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

⏰ 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
🔇 Additional comments (3)
source/_integrations/esphome.markdown (3)

124-129: Excellent addition of a Troubleshooting section. The new "Troubleshooting" and "Viewing Live Logs" subsections provide clear, step‑by‑step guidance on accessing live logs through both the Device Builder add‑on and the CLI. This will greatly help users diagnose issues with their ESPHome devices.


137-143: Clear instructions for passive log subscription. The "Obtaining Logs from the Device" section effectively explains how to enable log subscription in Home Assistant and adjust log levels via debug logging or the logger.set_level action. This will allow users to capture logs even when they’re not actively monitoring.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

141-141: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


141-141: Link fragments should be valid
null

(MD051, link-fragments)


141-143: Verify anchor link for options flow. The link [options flow](#options) must match the actual generated heading ID for the options section. Please confirm that this fragment is correct to avoid users encountering a broken link.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

141-141: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


141-141: Link fragments should be valid
null

(MD051, link-fragments)

@bdraco
Copy link
Member Author

bdraco commented Apr 18, 2025

thanks

@bdraco bdraco merged commit c741275 into current Apr 18, 2025
9 checks passed
@bdraco bdraco deleted the bdraco-patch-13 branch April 18, 2025 08:26
@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