Skip to content
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

Add docs for new switch platform for bosch alarm #38350

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

Conversation

sanjay900
Copy link
Contributor

@sanjay900 sanjay900 commented Apr 3, 2025

Proposed change

Add documentation for the new switch platform on the bosch alarm integration.

Switches are added to represent both doors and outputs on the panel.

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

  • New Features

    • Expanded Bosch Alarm integration to include switch functionality, offering additional control for outputs configured for remote operation.
  • Documentation

    • Updated integration details to clearly describe the switch capability alongside alarm controls, outlining its functionalities and usage limitations.

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

netlify bot commented Apr 3, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit a952b08
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/67f6da007391b3000899e1ae
😎 Deploy Preview https://deploy-preview-38350--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 3, 2025

📝 Walkthrough

Walkthrough

The Bosch Alarm integration documentation has been updated to include a new category ("Switch") in the ha_category field, an additional platform ("switch") in the ha_platforms field, and a new entity entry for Switch in the "Provided entities" section. The documentation now specifies that a switch is created for each output configured on the panel and that only outputs designated as "remote output" can be controlled via the Mode 2 API.

Changes

File Summary
source/_integrations/bosch_alarm.markdown Added new category "Switch" to ha_category, new platform "switch" to ha_platforms, and documented a new "Switch" entity for remote outputs.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant BoschIntegration
    participant AlarmPanel
    User->>BoschIntegration: Send switch control command
    BoschIntegration->>AlarmPanel: Check if output is a remote output
    AlarmPanel-->>BoschIntegration: Confirm remote output status
    BoschIntegration->>AlarmPanel: Execute Mode 2 API command for switch control
    AlarmPanel-->>BoschIntegration: Return output status update
    BoschIntegration->>User: Deliver switch state update
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 plan to trigger planning for file edits and PR creation.
  • @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 (1)
source/_integrations/bosch_alarm.markdown (1)

45-45: Remove Trailing Spaces
Static analysis indicates that line 45 contains trailing whitespace. Please remove the extra spaces to conform with markdown linting guidelines (MD009).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD009, no-trailing-spaces)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 773ff8a and b4a2f6e.

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

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

(MD009, no-trailing-spaces)

🔇 Additional comments (4)
source/_integrations/bosch_alarm.markdown (4)

6-6: New Category "Switch" Added to ha_category
The addition of "Switch" in the ha_category list correctly extends the integration’s classification to reflect the new switch functionality.


16-16: New Platform "switch" Added to ha_platforms
Including "switch" in the ha_platforms section is consistent with the new feature and follows the naming conventions established by the integration.


39-39: New "Switch" Entity Added to Provided Entities
The entry - [Switch](#switch) in the Provided Entities section clearly documents that a switch is created for each output configured on the panel. The hyperlink appears correctly set up.


46-48: New "Switch" Documentation Section
This section explains the switch functionality well, noting that only outputs with the type set to "remote output" can be controlled via the Mode 2 API. The details enhance clarity for users.

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 (1)
source/_integrations/bosch_alarm.markdown (1)

45-51: New "Switch" Section & Trailing Whitespace

The new section starting with ## Switch provides valuable details about the switch functionality, including the API limitations. For consistency and to maintain markdown style guidelines, please remove the trailing whitespace on line 45 (MD009).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD009, no-trailing-spaces)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b4a2f6e and 265e1fe.

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

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

(MD009, no-trailing-spaces)

🔇 Additional comments (3)
source/_integrations/bosch_alarm.markdown (3)

6-6: New Category Addition: "Switch"

The documentation now includes "Switch" as an additional category in ha_category, which aligns with the new Bosch Alarm switch platform. Ensure that related configuration and integration references are updated elsewhere if needed.


16-16: New Platform Addition: "switch"

The ha_platforms section now lists "switch". This clearly indicates that the integration supports switch functionality in addition to the traditional alarm control panel. Please verify that the underlying integration code supports this new platform.


39-39: Provided Entity Update: "Switch"

An entry for "Switch" has been added in the Provided Entities section. This documentation now clarifies that a switch is created for each output and will be available for panels with the "remote output" configuration alongside each configured door.

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 (1)
source/_integrations/bosch_alarm.markdown (1)

45-45: Remove Trailing Whitespace.

Static analysis indicates trailing spaces on this line. Please remove the extraneous whitespace to ensure compliance with markdownlint guidelines.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD009, no-trailing-spaces)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 265e1fe and b27eec9.

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

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

(MD009, no-trailing-spaces)

🔇 Additional comments (4)
source/_integrations/bosch_alarm.markdown (4)

4-7: Addition of "Switch" in ha_category is appropriate.

The YAML header now includes a new category "Switch," which aligns well with the PR objectives and clearly reflects the expansion of the integration's scope.


14-16: Inclusion of "switch" in ha_platforms is correctly implemented.

Adding the "switch" platform ensures that the integration recognizes the new switch functionality. Verify that downstream code handling these platforms expects the lowercase value.


38-39: Updated Provided Entities List with Switch.

The provided entities section now adds a link for "Switch," which contributes to clarity regarding the new feature. Ensure that the link (#switch) navigates correctly within the document.


46-50: New "Switch" Section Documentation is Informative.

The added section clearly explains that a switch is created for each output and for each configured door, while noting that only "remote output" types can be controlled via the Mode 2 API. This detailed description meets the documentation standards and aids user understanding.

c0ffeeca7
c0ffeeca7 previously approved these changes Apr 7, 2025
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, @sanjay900 👍

@github-project-automation github-project-automation bot moved this from Todo to Approved in Documentation PRs Apr 7, 2025
@c0ffeeca7 c0ffeeca7 added the awaits-parent Awaits the merge of an parent PR label Apr 7, 2025
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 (1)
source/_integrations/bosch_alarm.markdown (1)

45-45: Remove Trailing Whitespace
Trailing whitespace detected on line 45 should be removed to comply with Markdown style guidelines (MD009).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD009, no-trailing-spaces)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b27eec9 and 8dcae38.

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

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

(MD009, no-trailing-spaces)

⏰ 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/bosch_alarm.markdown (4)

4-6: New Category Addition in ha_category
The addition of "Switch" to the ha_category list clearly aligns with the new switch platform functionality. Please ensure that its naming and purpose remain consistent with Home Assistant documentation standards.


14-16: New Platform Entry in ha_platforms
The inclusion of "switch" alongside "alarm_control_panel" is correct and reflects the integration’s expanded capabilities. Confirm that the case and styling follow the project's naming conventions.


38-39: Provided Entities Update for Switch
The new entry - [Switch](#switch) in the Provided Entities section correctly links to the dedicated Switch documentation. Verify that the link anchor matches the section header below to ensure smooth navigation.


46-50: New Switch Section Documentation
The new Switch section clearly details that a switch is created for each output configured on the panel and that only outputs with the type set to remote output can be controlled via the Mode 2 API. Additionally, it notes that a switch is added for each configured door. This documentation is concise and informative; however, ensure it accurately reflects the integration’s behavior and that any special configuration requirements are mentioned if applicable.

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/bosch_alarm.markdown (2)

45-45: Remove Trailing Whitespace
A trailing whitespace has been detected on this line (MD009). Please remove the extra space to ensure compliance with markdownlint guidelines.

-  
+ 
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD009, no-trailing-spaces)


46-50: New Switch Documentation Section
The new "## Switch" section thoroughly explains the switch functionality: it clarifies that a switch is created for each output configured on the panel, notes that only outputs designated as remote output are controllable via the Mode 2 API, and specifies that three switches are added per door for locking, securing, or cycling the door.

Consider revising the sentence:

"Three switches are added per door, that allow for locking, securing or cycling the door."
to a more fluid version such as:
"Three switches are added per door to allow locking, securing, or cycling the door."

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8dcae38 and 281c34f.

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

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

(MD009, no-trailing-spaces)

🔇 Additional comments (3)
source/_integrations/bosch_alarm.markdown (3)

6-6: Addition of "Switch" in ha_category
The new "Switch" category is correctly added alongside "Alarm" in the ha_category section. This clearly signals the expanded functionality for the Bosch Alarm integration.


16-16: Inclusion of "switch" in ha_platforms
The addition of "switch" in the ha_platforms section follows Home Assistant’s naming conventions (using lowercase for platform identifiers) and correctly indicates support for the switch component.


39-39: Provided Entity Update: Link to Switch
The new bullet point for [Switch](#switch) in the Provided entities list properly references the new section added below, ensuring users can easily navigate to details about the switch functionality.

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

♻️ Duplicate comments (1)
source/_integrations/bosch_alarm.markdown (1)

40-42: Provided Entities Update: New Switch Entry

The provided entities section now includes a link to the "Switch" entity. This change mirrors the functional enhancements indicated in the PR, ensuring end users are aware of the new switch capabilities.

🧹 Nitpick comments (2)
source/_integrations/bosch_alarm.markdown (2)

48-48: Formatting Issue: Remove Trailing Whitespace

Line 48 contains extraneous trailing whitespace. Removing these spaces will help maintain consistency with markdown formatting standards.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD009, no-trailing-spaces)


49-53: Detailed Switch Section: Clarity and Completeness

The new "Switch" section comprehensively describes the behavior: a switch is created for each output configured on the panel, and it clarifies that only outputs with the type set to remote output can be controlled via Mode 2 API. It also notes that three switches are added per door for locking, securing, or cycling the door. Please verify that these details accurately reflect the integration's behavior and consider if further clarification is needed to help users differentiate between door-related switches and output switches, if applicable.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 281c34f and a952b08.

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

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

(MD009, no-trailing-spaces)

⏰ 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/bosch_alarm.markdown (2)

4-7: New Category Addition: Verify "Switch" Entry in ha_category

The addition of "Switch" to the ha_category list aligns well with the PR objectives and clearly communicates the expanded scope of the Bosch Alarm integration. Please confirm that the ordering of categories meets the project's documentation standards.


15-18: New Platform Addition: Validate "switch" in ha_platforms

The new platform "switch" has been added to the ha_platforms list. This is consistent with the introduction of switch functionality. Ensure that the integration code supports this platform and that related documentation is updated accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaits-parent Awaits the merge of an parent PR has-parent This PR has a parent PR in a other repo next This PR goes into the next branch
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

2 participants