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

Update switchbot.markdown #36375

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

greyeee
Copy link

@greyeee greyeee commented Dec 16, 2024

Proposed change

Add details of the Relay Switch 1 and Relay Switch 1PM added in this pull.

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

  • New Features

    • Added new integration documentation for Music Assistant, including support for media player functionalities.
    • Introduced new API endpoint for UniFi Protect to fetch video clips associated with specific events.
    • Added support for new sensor metrics in the Starlink integration, including Upload, Download, Power, and Energy.
    • New integration documentation added for Powerfox, detailing smart meter data collection.
    • Added support for new devices in the SwitchBot integration, including Relay Switch 1 and Relay Switch 1PM.
  • Documentation

    • Updated various integration documents to improve clarity and usability, including sections on configuration, supported devices, and operational details.
    • Enhanced documentation for the BMW Connected Drive integration to clarify new captcha requirements.
    • Revised the documentation for the Tesla Fleet API integration with updated instructions and API usage details.
    • Clarified the Home Connect integration documentation to reflect support for select entities.
  • Bug Fixes

    • Corrected numbering in the Google Assistant integration documentation for service account creation steps.
    • Updated terminology in the Habitica integration documentation for consistency.
  • Chores

    • Extensive updates to the _redirects file to enhance navigation and accessibility for users.

@home-assistant home-assistant bot added the current This PR goes into the current branch label Dec 16, 2024
@home-assistant
Copy link

It seems that this PR is targeted against an incorrect branch since it has a parent PR on one of our codebases. Documentation that needs to be updated for an upcoming release should target the next branch. Please change the target branch of this PR to next and rebase if needed.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in a other repo 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 labels Dec 16, 2024
@greyeee greyeee changed the base branch from current to next December 16, 2024 07:22
@home-assistant home-assistant bot removed current This PR goes into the current branch needs-rebase The PR has been branched of the wrong base branch or targets an incorrect target branch labels Dec 16, 2024
@home-assistant home-assistant bot added the next This PR goes into the next branch label Dec 16, 2024
Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit c6c917e
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/676071fda745cb00084fb116
😎 Deploy Preview https://deploy-preview-36375--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.

@joostlek
Copy link
Member

Please use next as a base branch as well

Copy link
Contributor

coderabbitai bot commented Dec 16, 2024

📝 Walkthrough

Walkthrough

This pull request encompasses a comprehensive set of documentation updates across multiple Home Assistant integration files, redirects, and configuration files. The changes span various domains, including adding new integrations like Music Assistant and Powerfox, updating existing integration documentation, modifying CODEOWNERS, and restructuring URL redirects. The modifications aim to improve documentation clarity, expand integration support, and enhance user guidance across different aspects of the Home Assistant ecosystem.

Changes

File/Section Change Summary
CODEOWNERS Added @music-assistant for music_assistant.markdown documentation
plugins/icon.rb Enhanced icon tag handling with new default_title method and updated regex
source/_docs/tools/quick-bar.markdown Added Device Filter and Assist feature documentation with new hotkeys
source/_includes/asides/component_navigation.html Updated quality scale representation
source/_integrations/ Multiple integrations added/updated:
- Alexa Smart Home locale support
- Bang & Olufsen custom actions
- BMW Connected Drive captcha info
- EHEIM Digital
- Google Assistant setup steps
- Habitica sensor terminology
- HomeKit linked doorbell sensor
- Music Assistant
- Nordpool integration type
- Powerfox
- Reolink title simplification
- Starlink new sensors
- SwitchBot new devices
source/_redirects Extensive redirect updates for community resources, documentation, and integration pages

Sequence Diagram

sequenceDiagram
    participant User
    participant HomeAssistant
    participant Integration
    participant API

    User->>HomeAssistant: Configure Integration
    HomeAssistant->>Integration: Initialize Setup
    Integration->>API: Authenticate/Fetch Data
    API-->>Integration: Return Configuration/Data
    Integration-->>HomeAssistant: Provide Entities
    HomeAssistant-->>User: Display Integration Details
Loading

This sequence diagram represents the general flow of integration setup and data retrieval in Home Assistant, which is consistent with many of the integration documentation updates in this pull request.

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between bd7cef6 and ee0aef7.

⛔ Files ignored due to path filters (2)
  • Gemfile.lock is excluded by !**/*.lock
  • source/images/integrations/slide_local/slide-bottom.png is excluded by !**/*.png
📒 Files selected for processing (37)
  • CODEOWNERS (1 hunks)
  • plugins/icon.rb (1 hunks)
  • source/_docs/tools/quick-bar.markdown (3 hunks)
  • source/_includes/asides/component_navigation.html (1 hunks)
  • source/_integrations/alexa.smart_home.markdown (2 hunks)
  • source/_integrations/bang_olufsen.markdown (1 hunks)
  • source/_integrations/bmw_connected_drive.markdown (1 hunks)
  • source/_integrations/devolo_home_control.markdown (0 hunks)
  • source/_integrations/eheimdigital.markdown (1 hunks)
  • source/_integrations/google_assistant.markdown (1 hunks)
  • source/_integrations/habitica.markdown (1 hunks)
  • source/_integrations/home_connect.markdown (3 hunks)
  • source/_integrations/homekit.markdown (2 hunks)
  • source/_integrations/homewizard.markdown (2 hunks)
  • source/_integrations/image_upload.markdown (2 hunks)
  • source/_integrations/input_boolean.markdown (2 hunks)
  • source/_integrations/iron_os.markdown (4 hunks)
  • source/_integrations/knx.markdown (2 hunks)
  • source/_integrations/music_assistant.markdown (1 hunks)
  • source/_integrations/niko_home_control.markdown (2 hunks)
  • source/_integrations/nordpool.markdown (2 hunks)
  • source/_integrations/number.markdown (1 hunks)
  • source/_integrations/palazzetti.markdown (2 hunks)
  • source/_integrations/powerfox.markdown (1 hunks)
  • source/_integrations/reolink.markdown (1 hunks)
  • source/_integrations/schlage.markdown (3 hunks)
  • source/_integrations/sensor.markdown (1 hunks)
  • source/_integrations/simulated.markdown (0 hunks)
  • source/_integrations/slide_local.markdown (1 hunks)
  • source/_integrations/spotify.markdown (0 hunks)
  • source/_integrations/starlink.markdown (1 hunks)
  • source/_integrations/stookalert.markdown (0 hunks)
  • source/_integrations/switchbot.markdown (2 hunks)
  • source/_integrations/tesla_fleet.markdown (1 hunks)
  • source/_integrations/unifiprotect.markdown (4 hunks)
  • source/_posts/2024-10-02-connect-zbt1-issue-and-replacement.markdown (3 hunks)
  • source/_redirects (1 hunks)
💤 Files with no reviewable changes (4)
  • source/_integrations/stookalert.markdown
  • source/_integrations/spotify.markdown
  • source/_integrations/devolo_home_control.markdown
  • source/_integrations/simulated.markdown
✅ Files skipped from review due to trivial changes (2)
  • CODEOWNERS
  • source/_integrations/google_assistant.markdown
🧰 Additional context used
📓 Path-based instructions (2)
plugins/icon.rb (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

source/_redirects (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

🪛 LanguageTool
source/_integrations/bmw_connected_drive.markdown

[uncategorized] ~64-~64: Possible missing article found.
Context: ...{% important %} The North America and Rest of world regions require a captcha challenge to...

(AI_HYDRA_LEO_MISSING_THE)

source/_integrations/slide_local.markdown

[grammar] ~37-~37: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...lude integrations/config_flow.md %} To setup the integration you need the following ...

(NOUN_VERB_CONFUSION)


[uncategorized] ~37-~37: Possible missing comma found.
Context: ...rations/config_flow.md %} To setup the integration you need the following information: {%...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~45-~45: This phrase is redundant. Consider using “inside”.
Context: ...ription: The device code of your Slide (inside of your Slide or in the box, 8 characters)...

(OUTSIDE_OF)


[uncategorized] ~54-~54: Possible missing article found.
Context: ...Cover Your slide device will appear as cover. ### Button You can start the calibra...

(AI_HYDRA_LEO_MISSING_A)

source/_integrations/tesla_fleet.markdown

[typographical] ~67-~67: Consider adding a comma here.
Context: ...yment details to Tesla For more details please see [developer.tesla.com](https://devel...

(PLEASE_COMMA)

source/_integrations/music_assistant.markdown

[style] ~23-~23: Consider removing “of” to be more concise
Context: ...orms: - Media player All of the Home Assistant [Media Player Control Ac...

(ALL_OF_THE)


[uncategorized] ~34-~34: Possible missing comma found.
Context: ...r entities for all players available in MA including those imported from Home Assi...

(AI_HYDRA_LEO_MISSING_COMMA)

source/_docs/tools/quick-bar.markdown

[grammar] ~24-~24: A determiner cannot be combined with a possessive pronoun. Did you mean simply “a” or “my”?
Context: ...) link | m | Open a new tab to create a my link to the page you are on. | Assist |...

(A_MY)

source/_posts/2024-10-02-connect-zbt1-issue-and-replacement.markdown

[style] ~15-~15: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ... covers ZBT-1 branded devices purchased prior to October 2024, and not SkyConnect-brande...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[style] ~18-~18: Specify a number, remove phrase, use “a few”, or use “some”
Context: ...sistant Connect ZBT-1 that has affected a small number of customers, which appears to be the resu...

(SMALL_NUMBER_OF)


[style] ~21-~21: “Sorry” is a very overused expression. Consider replacing it with a more formal alternative.
Context: ...ything remotely similar in the future. We're sorry for any inconvenience this may cause you. B...

(APOLOGIZE)


[style] ~41-~41: Specify a number, remove phrase, use “a few”, or use “some”
Context: ...ice with any hardware, and even if only a small number of devices from this production run have r...

(SMALL_NUMBER_OF)

source/_integrations/unifiprotect.markdown

[style] ~277-~277: To form a complete sentence, be sure to include a subject or ‘there’.
Context: ...amera endpoint defined above. nvr_id can either be the UniFi Protect ID of your ...

(MISSING_IT_THERE)


[uncategorized] ~305-~305: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...Waiting ensures that the event has ended and the video is accessible; otherwise, you...

(COMMA_COMPOUND_SENTENCE_2)

source/_integrations/nordpool.markdown

[uncategorized] ~24-~24: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...e a dedicated Home Assistant integration and you have a spot-price-based contract, y...

(COMMA_COMPOUND_SENTENCE)


[uncategorized] ~57-~57: A punctuation mark might be missing here.
Context: ...vious price | [Currency]/kWh | The price of the previous hour. ...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[uncategorized] ~58-~58: A punctuation mark might be missing here.
Context: ...t price | [Currency]/kWh | The price of the next hour. ...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[uncategorized] ~59-~59: A punctuation mark might be missing here.
Context: ...ly average | [Currency]/kWh | The average of today's energy prices. ...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[grammar] ~75-~75: A determiner may be missing.
Context: ...------------------- | | [peak/off-peak] highest price | [Currency]/kWh | The hight...

(THE_SUPERLATIVE)


[grammar] ~76-~76: A determiner may be missing.
Context: ... | | [peak/off-peak] lowest price | [Currency]/kWh | The lowe...

(THE_SUPERLATIVE)


[uncategorized] ~76-~76: A punctuation mark might be missing here.
Context: ...-peak] lowest price | [Currency]/kWh | The lowest hourly price during the giv...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[uncategorized] ~77-~77: A punctuation mark might be missing here.
Context: ...-peak] average | [Currency]/kWh | The average price of the given timefra...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[uncategorized] ~100-~100: Consider adding a hyphen.
Context: ..., choose the Helpers tab. 2. In the bottom right corner, select Create helper. 3. Se...

(TOP_LEFT_CORNER)


[misspelling] ~112-~112: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...sensor to add VAT and a fixed cost from an helper entity `input_number.add_fixed_c...

(EN_A_VS_AN)

source/_integrations/powerfox.markdown

[uncategorized] ~48-~48: It appears that hyphens are missing in the adjective “up-to-date”.
Context: ...s ensures the data in Home Assistant is up to date. ## Actions This integration does not...

(UP_TO_DATE_HYPHEN)

🪛 Markdownlint (0.37.0)
source/_integrations/bmw_connected_drive.markdown

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

(MD009, no-trailing-spaces)

source/_integrations/slide_local.markdown

68-68: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

source/_integrations/tesla_fleet.markdown

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

(MD009, no-trailing-spaces)


58-58: Column: 1
Hard tabs

(MD010, no-hard-tabs)

source/_integrations/input_boolean.markdown

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

(MD009, no-trailing-spaces)

source/_integrations/alexa.smart_home.markdown

326-326: null
Link fragments should be valid

(MD051, link-fragments)

source/_integrations/music_assistant.markdown

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

(MD009, no-trailing-spaces)

source/_docs/tools/quick-bar.markdown

56-56: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

source/_posts/2024-10-02-connect-zbt1-issue-and-replacement.markdown

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

(MD032, blanks-around-lists)

🔇 Additional comments (35)
source/_integrations/knx.markdown (2)

2019-2022: LGTM: New DPT types added correctly.

The addition of DPT 29 types for 8-byte signed values is well documented with proper ranges and units:

  • DPT 29: 8byte_signed with range ±9223372036854775807
  • DPT 29.010: active_energy_8byte (Wh)
  • DPT 29.011: apparant_energy_8byte (VAh)
  • DPT 29.012: reactive_energy_8byte (VARh)

2302-2302: LGTM: Air pressure address description updated.

The description for address_air_pressure has been updated to specify support for both DPT 9.006 and DPT 14.058, providing more flexibility for air pressure measurements.

source/_integrations/homekit.markdown (2)

163-165: LGTM! Clear and accurate configuration documentation.

The updated description for linked_doorbell_sensor clearly explains that it can be used with both lock and camera accessories.


424-424: LGTM! Consistent documentation of lock doorbell support.

The supported integrations table correctly reflects the new doorbell sensor support for locks, maintaining consistency with the configuration documentation.

source/_integrations/number.markdown (1)

54-55: LGTM! Comprehensive update to energy units

The expanded list of energy units provides better coverage of commonly used measurements in both SI and imperial systems. The changes are consistent with the sensor integration documentation and follow proper unit notation.

source/_integrations/sensor.markdown (1)

65-66: LGTM! Documentation maintains consistency

The energy and energy_storage device class updates maintain perfect consistency with the number integration documentation. The units are well-organized in ascending order of magnitude and cover all commonly used energy measurements.

source/_integrations/homewizard.markdown (1)

113-113: Verify the necessity of custom polling instructions.

The documentation states there is "no limitation on the number or frequency of requests," yet includes instructions for custom polling. This might be confusing for users. Consider either:

  1. Removing the custom polling section if there's truly no need to modify the polling interval, or
  2. Clarifying why a user might want to modify the default 5-second polling interval despite no limitations.
source/_integrations/switchbot.markdown (1)

69-70: LGTM! Device list additions are properly formatted.

The new Relay Switch devices are correctly added to the supported devices list with proper formatting and product page links.

source/_integrations/unifiprotect.markdown (2)

281-305: LGTM! Well-documented example with important implementation details

The example automation is clear and includes crucial information about waiting for the motion sensor state change to ensure the video is accessible.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~305-~305: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...Waiting ensures that the event has ended and the video is accessible; otherwise, you...

(COMMA_COMPOUND_SENTENCE_2)


Line range hint 319-421: LGTM! Comprehensive event documentation with security considerations

Excellent documentation of event entities with:

  • Clear examples for each event type
  • Important security warnings for NFC and fingerprint implementations
  • Well-structured automation examples
source/_integrations/nordpool.markdown (3)

15-17: LGTM: Frontmatter updates are accurate.

The addition of the diagnostics platform and the change to hub integration type correctly reflect the integration's capabilities.


42-47: LGTM: Clear explanation of data fetching behavior.

The section effectively communicates the polling mechanism and error handling strategy.


141-143: LGTM: Standard removal instructions.

The removal section follows the documentation standards.

source/_integrations/niko_home_control.markdown (1)

4-4: LGTM! Verify the config flow implementation exists

The addition of ha_config_flow: true correctly indicates UI-based configuration support.

Let's verify that the corresponding config flow implementation exists:

source/_integrations/slide_local.markdown (1)

18-22: LGTM!

The introduction and supported devices sections are clear and well-documented.

source/_integrations/iron_os.markdown (2)

8-8: LGTM: Binary sensor platform properly documented

The binary sensor platform is correctly added to both ha_category and ha_platforms sections.

Also applies to: 20-20


Line range hint 1-91: Verify documentation against implementation

Let's verify that all documented features are implemented in the codebase.

🧰 Tools
🪛 Markdownlint (0.37.0)

55-55: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

source/_redirects (2)

615-615: LGTM!

The redirect for the removed 'simulated' integration is properly set up.


623-623: LGTM!

The redirect for the removed 'stookalert' integration is correctly configured.

source/_integrations/palazzetti.markdown (3)

40-40: LGTM: Improved clarity in fan speed documentation

The change from comma-separated values to a range notation (1 to 5) improves readability.


44-47: LGTM: Well-structured new Numbers section

Clear and concise documentation of the combustion power control feature.


60-60: LGTM: Added new sensor documentation

Appropriate addition of the pellet level sensor measurement.

source/_integrations/schlage.markdown (3)

26-32: LGTM: Clear device compatibility list

Good addition of tested device models with appropriate disclaimer about untested devices.


43-46: LGTM: Added important operational detail

Clear documentation of the 30-second polling interval for lock state updates.


71-76: LGTM: Clear removal instructions

Appropriate documentation of the standard removal process.

source/_integrations/input_boolean.markdown (1)

49-49: LGTM: Improved clarity of default behavior

Clear documentation of the state restoration behavior for the initial configuration option.

source/_integrations/music_assistant.markdown (1)

1-16: LGTM! Front matter is well-structured.

The metadata section correctly defines all required fields including title, description, category, release version, and integration type.

source/_includes/asides/component_navigation.html (1)

61-67: LGTM! Quality scale indicators are well-implemented.

The new quality scale categories are properly linked to their respective documentation sections and use consistent emoji indicators for visual distinction.

source/_docs/tools/quick-bar.markdown (2)

46-54: LGTM! Well-documented Device Filter section.

The new Device Filter section is clear, concise, and provides helpful context for users.


82-89: LGTM! Clear documentation of the Assist feature.

The section effectively explains the feature and its prerequisites, with helpful links to additional documentation.

source/_integrations/home_connect.markdown (1)

36-39: LGTM! Clear documentation of program selection functionality.

The updates effectively explain the new select entities and their relationship with program control.

source/_integrations/bang_olufsen.markdown (1)

262-289: LGTM! Comprehensive documentation of Beolink join functionality.

The updates provide clear documentation of the source_id attribute, including:

  • Detailed compatibility table
  • Platform-specific considerations
  • Clear usage examples
source/_integrations/habitica.markdown (1)

90-91: Text improvements look good

The changes improve clarity by:

  1. Using correct terminology "Habits" instead of "Ha Dispbits"
  2. Fixing typo in Rewards description from "lays" to "Displays"
source/_integrations/reolink.markdown (1)

2-2: Title simplification looks good

The simplified title "Reolink" is cleaner while still effectively representing the integration.

source/_integrations/alexa.smart_home.markdown (1)

326-326: Added locale support looks good

The addition of Dutch (nl-NL) and Portuguese (pt-BR) locales expands the international support for the Alexa integration.

Also applies to: 419-419

🧰 Tools
🪛 Markdownlint (0.37.0)

326-326: null
Link fragments should be valid

(MD051, link-fragments)


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • 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. (Beta)
  • @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.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.

Actionable comments posted: 5

🧹 Nitpick comments (31)
source/_integrations/bmw_connected_drive.markdown (2)

63-71: LGTM! Consider minor language improvements.

The captcha requirement section is well-structured and provides clear instructions. Consider these minor language improvements:

  • Add "the" before "North America"
  • Use consistent backticks for UI elements: Replace "are you a human?" with `are you a human?`
-The `North America` and `Rest of world` regions require a captcha challenge to be solved, i.e. you need to verify that you are a human.
+The `North America` and `Rest of world` regions require a captcha challenge to be solved, i.e., you need to verify that you are a human.
 After entering your login data, a second step will ask for a `Captcha token` and provide you with a link to a website. 
 Please open this link, solve the "are you a human?" challenge and press `Submit`.
+Please open this link, solve the `are you a human?` challenge and press `Submit`.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~64-~64: Possible missing article found.
Context: ...{% important %} The North America and Rest of world regions require a captcha challenge to...

(AI_HYDRA_LEO_MISSING_THE)

🪛 Markdownlint (0.37.0)

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

(MD009, no-trailing-spaces)


65-65: Remove trailing space.

There's a trailing space at the end of line 65.

-After entering your login data, a second step will ask for a `Captcha token` and provide you with a link to a website. 
+After entering your login data, a second step will ask for a `Captcha token` and provide you with a link to a website.
🧰 Tools
🪛 Markdownlint (0.37.0)

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

(MD009, no-trailing-spaces)

source/_integrations/homewizard.markdown (1)

136-142: Enhance the removal instructions for better clarity.

While the removal instructions are generally good, consider these improvements:

 ## Remove integration

 This integration follows standard integration removal.

 {% include integrations/remove_device_service.md %}

-After deleting the integration, go to the HomeWizard Energy app and disable the local API if no other integrations are using it.
+{% details "Important: Disable Local API after removal" %}
+After removing the integration:
+1. Open the HomeWizard Energy app
+2. Navigate to Settings > Meters > [Your Device]
+3. Disable the "Local API" option if you're not using it with other integrations
+
+This step is important for security and ensures your device isn't unnecessarily exposing its API.
+{% enddetails %}
source/_integrations/switchbot.markdown (2)

83-83: Consider a more concise section title.

While the title accurately includes all devices, it's becoming quite long. Consider grouping similar devices or using a more generic title like "SwitchBot Lock and Relay Devices" for better readability.


87-87: Consider clarifying device-specific setup requirements.

While the setup instructions now include relay switches, it would be helpful to specify if there are any differences in the setup process between locks and relay switches, or if any device-specific requirements exist.

Consider adding a note like:

-A SwitchBot lock and relay switch can be set up in Home Assistant in two different ways. You can enter the key id and encryption key yourself, or Home Assistant can import them from your SwitchBot account.
+A SwitchBot lock and relay switch can be set up in Home Assistant in two different ways. You can enter the key id and encryption key yourself, or Home Assistant can import them from your SwitchBot account. Both device types follow the same setup process with no additional requirements.
source/_integrations/unifiprotect.markdown (1)

263-276: Improve API endpoints documentation structure

Consider restructuring the API endpoints section for better clarity:

-Three URLs for proxy API endpoints:
+The integration provides three proxy API endpoints:

 `/api/unifiprotect/thumbnail/{nvr_id}/{event_id}`
-
 - Proxies a JPEG event thumbnail from UniFi Protect.

 `/api/unifiprotect/video/{nvr_id}/{camera_id}/{start}/{end}`
-
 - Proxies a MP4 video clip from UniFi Protect for a specific camera. Start and end must be in [ISO 8601 format](https://www.iso.org/iso-8601-date-and-time-format.html).

 `/api/unifiprotect/video/{nvr_id}/{event_id}`
-
 - Proxies a MP4 video clip from UniFi Protect for a specific event. To get the video, the event needs to be finished. If it's still ongoing, use the camera endpoint defined above.
source/_integrations/nordpool.markdown (3)

24-24: Fix grammar in the introduction.

Add a comma before 'and' as it connects two independent clauses:

-Most European energy is traded via the Nord Pool Group marketplace. If your energy provider doesn't have a dedicated Home Assistant integration and you have a spot-price-based contract, you can use the **Nord Pool** {% term integration %}.
+Most European energy is traded via the Nord Pool Group marketplace. If your energy provider doesn't have a dedicated Home Assistant integration, and you have a spot-price-based contract, you can use the **Nord Pool** {% term integration %}.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~24-~24: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...e a dedicated Home Assistant integration and you have a spot-price-based contract, y...

(COMMA_COMPOUND_SENTENCE)


75-75: Fix typo in table description.

Correct the spelling of "highest":

-| [peak/off-peak] highest price   | [Currency]/kWh    | The hightest hourly price during the given timeframe.                             |
+| [peak/off-peak] highest price   | [Currency]/kWh    | The highest hourly price during the given timeframe.                             |
🧰 Tools
🪛 LanguageTool

[grammar] ~75-~75: A determiner may be missing.
Context: ...------------------- | | [peak/off-peak] highest price | [Currency]/kWh | The hight...

(THE_SUPERLATIVE)


112-112: Fix grammar in template description.

Use "a" instead of "an" before "helper":

-A template sensor to add VAT and a fixed cost from an helper entity `input_number.add_fixed_cost`.
+A template sensor to add VAT and a fixed cost from a helper entity `input_number.add_fixed_cost`.
🧰 Tools
🪛 LanguageTool

[misspelling] ~112-~112: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...sensor to add VAT and a fixed cost from an helper entity `input_number.add_fixed_c...

(EN_A_VS_AN)

source/_integrations/slide_local.markdown (4)

37-37: Fix grammar: "setup" should be "set up"

The word "setup" is being used as a verb, but it should be "set up" when used as a verb.

-To setup the integration you need the following information:
+To set up the integration you need the following information:
🧰 Tools
🪛 LanguageTool

[grammar] ~37-~37: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...lude integrations/config_flow.md %} To setup the integration you need the following ...

(NOUN_VERB_CONFUSION)


[uncategorized] ~37-~37: Possible missing comma found.
Context: ...rations/config_flow.md %} To setup the integration you need the following information: {%...

(AI_HYDRA_LEO_MISSING_COMMA)


44-48: Clarify password field description

The password field description could be clearer about API version differences.

-  description: The device code of your Slide (inside of your Slide or in the box, 8 characters). Only required for API 1, with API 2 you can fill in anything here.
+  description: >-
+    For API 1: The 8-character device code found inside your Slide or in the box.
+    For API 2: Any value can be used as this field is not required.
🧰 Tools
🪛 LanguageTool

[style] ~45-~45: This phrase is redundant. Consider using “inside”.
Context: ...ription: The device code of your Slide (inside of your Slide or in the box, 8 characters)...

(OUTSIDE_OF)


54-54: Add missing article

Add the article "a" before "cover" for proper grammar.

-Your slide device will appear as cover.
+Your slide device will appear as a cover.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~54-~54: Possible missing article found.
Context: ...Cover Your slide device will appear as cover. ### Button You can start the calibra...

(AI_HYDRA_LEO_MISSING_A)


68-68: Remove extra blank line

There are multiple consecutive blank lines. Remove one of them to maintain consistent formatting.

-

-
+
🧰 Tools
🪛 Markdownlint (0.37.0)

68-68: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

source/_integrations/powerfox.markdown (4)

37-43: Consider enhancing the device support table

The device support table is informative but could be more helpful by including:

  • Links to device specifications or documentation
  • Firmware version requirements (if applicable)
  • Notes about specific limitations for partially supported devices

47-48: Fix hyphenation in compound modifier

The phrase "up to date" should be hyphenated when used as a compound modifier.

-minute. This ensures the data in Home Assistant is up to date.
+minute. This ensures the data in Home Assistant is up-to-date.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~48-~48: It appears that hyphens are missing in the adjective “up-to-date”.
Context: ...s ensures the data in Home Assistant is up to date. ## Actions This integration does not...

(UP_TO_DATE_HYPHEN)


62-67: Consider adding technical details for sensors

The sensor descriptions could be enhanced with:

  • Units of measurement for each sensor
  • State class information (measurement, total, total_increasing)
  • Device class assignments
  • Update frequency for each sensor type

18-20: Consider adding usage examples

The introduction could be enhanced with:

  • Real-world usage examples
  • Screenshots of the integration in action
  • Example automations or scripts using the sensors
  • Energy dashboard configuration examples
source/_integrations/tesla_fleet.markdown (4)

48-48: Enhance visibility of the redirect URL requirement

Consider highlighting the redirect URL requirement more prominently, as it's a critical setup step that users often miss.

-When creating the application, you must set the redirect URL to `https://my.home-assistant.io/redirect/oauth`, but the other URLs can be set as desired.
+When creating the application:
+1. Set the redirect URL to: `https://my.home-assistant.io/redirect/oauth` (required)
+2. Other URLs can be set as desired

58-67: Fix formatting issues and typo

There are several minor issues in this section:

  1. Fix the typo: "calandar" → "calendar"
  2. Remove hard tab on line 58
  3. Add a comma after "Tesla" in the last line
-Previously, Tesla restricted this integration to a very modest rate limit. However, from January 2025, accounts in eligible countries will be charged for every API call. Here's what you need to know:
-
-- Tesla provides a $10 credit per developer account per calandar month
-- Every vehicle coordinator refresh, vehicle command, and wake up has a cost
-- This credit only allows for a maximum of 5000 coordinator refreshes
-- Energy product APIs are free to use at this time
-- To go beyond the free credit, you must provide payment details to Tesla
-
-For more details please see [developer.tesla.com](https://developer.tesla.com).
+Previously, Tesla restricted this integration to a very modest rate limit. However, from January 2025, accounts in eligible countries will be charged for every API call. Here's what you need to know:
+
+- Tesla provides a $10 credit per developer account per calendar month
+- Every vehicle coordinator refresh, vehicle command, and wake up has a cost
+- This credit only allows for a maximum of 5000 coordinator refreshes
+- Energy product APIs are free to use at this time
+- To go beyond the free credit, you must provide payment details to Tesla
+
+For more details, please see [developer.tesla.com](https://developer.tesla.com).
🧰 Tools
🪛 Markdownlint (0.37.0)

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

(MD009, no-trailing-spaces)


58-58: Column: 1
Hard tabs

(MD010, no-hard-tabs)

🪛 LanguageTool

[typographical] ~67-~67: Consider adding a comma here.
Context: ...yment details to Tesla For more details please see [developer.tesla.com](https://devel...

(PLEASE_COMMA)


Line range hint 69-82: Add security note about key backup

Consider adding a note about securely backing up the generated key file, as losing it would require regenerating and reinstalling the key on the vehicle.

tesla-control -ble -key-file tesla_fleet.key -vin VINVINVINVIN add-key-request tesla_fleet.pem owner cloud_key

+{% note %}
+It is recommended to securely back up the generated tesla_fleet.key file. If this file is lost, you will need to generate a new key pair and install it on your vehicle again.
+{% endnote %}

🧰 Tools
🪛 Markdownlint (0.37.0)

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

(MD009, no-trailing-spaces)


58-58: Column: 1
Hard tabs

(MD010, no-hard-tabs)

🪛 LanguageTool

[typographical] ~67-~67: Consider adding a comma here.
Context: ...yment details to Tesla For more details please see [developer.tesla.com](https://devel...

(PLEASE_COMMA)


Line range hint 84-84: Add note about entity availability

Consider adding a note explaining that entity availability may vary depending on the vehicle model and firmware version.

## Entities

+{% note %}
+The availability of entities may vary depending on your vehicle model and firmware version. Some entities might not be available or may behave differently on certain models.
+{% endnote %}

These are the entities available in the Tesla Fleet integration. Not all entities are enabled by default, and not all values are always available.
🧰 Tools
🪛 Markdownlint (0.37.0)

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

(MD009, no-trailing-spaces)


58-58: Column: 1
Hard tabs

(MD010, no-hard-tabs)

🪛 LanguageTool

[typographical] ~67-~67: Consider adding a comma here.
Context: ...yment details to Tesla For more details please see [developer.tesla.com](https://devel...

(PLEASE_COMMA)

source/_integrations/iron_os.markdown (2)

35-37: Consider enhancing the binary sensor documentation

While the documentation clearly states what the sensor indicates, it would be helpful to add:

  • The possible states of the sensor (true/false meanings)
  • Any relevant timing or behavior details
  • Common troubleshooting scenarios

78-84: Consider adding safety warnings and value ranges for power settings

For critical power management settings, consider adding:

  • Valid value ranges for each setting
  • Safety warnings about potential risks
  • Examples of recommended values for common scenarios

This is particularly important for settings like:

  • Power limit
  • Min. voltage per cell
  • Keep-awake pulse settings
source/_integrations/image_upload.markdown (1)

18-18: Consider rephrasing for active voice

To align with the style guidelines, rephrase the sentence using active voice.

Suggested change:

-Uploaded images are also viewable in the media browser.
+You can view uploaded images in the media browser.
source/_integrations/eheimdigital.markdown (1)

23-23: Use bold formatting for UI strings

According to the style guidelines, use bold formatting to mark UI strings. Update eheimdigital.local to use bold formatting.

Suggested change:

-"The IP address or hostname of your EHEIM Digital main device. Defaults to `eheimdigital.local`, an IP address should only be necessary if the hostname doesn't work."
+"The IP address or hostname of your EHEIM Digital main device. Defaults to **eheimdigital.local**; specify an IP address only if the hostname doesn't resolve."
source/_integrations/input_boolean.markdown (1)

81-81: Remove trailing space

There is a trailing space at the end of line 81.

-Home Assistant stopping; if there is no state to restore - an `off` value is set. 
+Home Assistant stopping; if there is no state to restore - an `off` value is set.
🧰 Tools
🪛 Markdownlint (0.37.0)

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

(MD009, no-trailing-spaces)

source/_integrations/music_assistant.markdown (2)

18-24: Consider enhancing the introduction with setup prerequisites.

While the introduction is clear, it would be helpful to mention any prerequisites (e.g., required Music Assistant Server version) before users begin the setup process.

🧰 Tools
🪛 LanguageTool

[style] ~23-~23: Consider removing “of” to be more concise
Context: ...orms: - Media player All of the Home Assistant [Media Player Control Ac...

(ALL_OF_THE)


74-107: Improve action documentation with more examples.

The music_assistant.play_media action documentation is thorough, but could benefit from more real-world examples showing different combinations of optional parameters.

Consider adding examples like:

# Play an album with radio mode
service: music_assistant.play_media
data:
  media_id: "Dark Side of the Moon"
  media_type: "album"
  artist: "Pink Floyd"
  radio_mode: true
  enqueue: "play"
source/_posts/2024-10-02-connect-zbt1-issue-and-replacement.markdown (2)

14-16: Enhance the note block's clarity.

Consider rewording to be more concise and direct:

-The replacement program is now operational, please contact the retailer where you purchased your device to request a replacement. The replacement program only covers ZBT-1 branded devices purchased prior to October 2024, and not SkyConnect-branded devices (identify which device you have [with this graphic](#do-i-have-a-zbt-1)).
+The replacement program is active. Contact your retailer for a replacement if you purchased a ZBT-1 branded device before October 2024. This does not affect SkyConnect-branded devices. [Check which device you have](#do-i-have-a-zbt-1).
🧰 Tools
🪛 LanguageTool

[style] ~15-~15: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ... covers ZBT-1 branded devices purchased prior to October 2024, and not SkyConnect-brande...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


23-27: Add spacing around the list for better readability.

The markdown list should be surrounded by blank lines for better formatting.

We're sorry for any inconvenience this may cause you. Below are details on our investigation, how devices are affected, and the replacement program.
+
- [Background](#background)
- [Do I have a ZBT-1?](#do-i-have-a-zbt-1)
- [Pausing sales](#pausing-sales)
- [Replacement Program](#replacement-program)
- [Conclusion](#conclusion)
+
🧰 Tools
🪛 Markdownlint (0.37.0)

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

(MD032, blanks-around-lists)

source/_docs/tools/quick-bar.markdown (1)

24-24: Fix grammar in link creation description.

The phrase "create a my link" contains a grammatical error.

-| Create [`my`](/integrations/my) link | `m` | Open a new tab to create a my link to the page you are on.
+| Create [`my`](/integrations/my) link | `m` | Open a new tab to create a link to the page you are on.
🧰 Tools
🪛 LanguageTool

[grammar] ~24-~24: A determiner cannot be combined with a possessive pronoun. Did you mean simply “a” or “my”?
Context: ...) link | m | Open a new tab to create a my link to the page you are on. | Assist |...

(A_MY)

🛑 Comments failed to post (5)
source/_integrations/niko_home_control.markdown (1)

20-20: 🛠️ Refactor suggestion

Add migration instructions for existing YAML users

While the inclusion of the config flow documentation is correct, please add migration instructions for users who are currently using YAML configuration. This helps ensure a smooth transition for existing users.

Add a section before the config flow documentation:

 The `niko_home_control` {% term integration %} allows you to integrate your [Niko Home Control](https://www.niko.eu/enus/products/niko-home-control) into Home Assistant.

+## Migration to UI configuration
+
+If you are currently using YAML configuration for Niko Home Control, you will need to remove the configuration from your `configuration.yaml` file and reconfigure the integration through the UI. Your existing entities and configurations will be preserved during this migration.
+
 {% include integrations/config_flow.md %}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

The `niko_home_control` {% term integration %} allows you to integrate your [Niko Home Control](https://www.niko.eu/enus/products/niko-home-control) into Home Assistant.

## Migration to UI configuration

If you are currently using YAML configuration for Niko Home Control, you will need to remove the configuration from your `configuration.yaml` file and reconfigure the integration through the UI. Your existing entities and configurations will be preserved during this migration.

{% include integrations/config_flow.md %}
source/_integrations/slide_local.markdown (1)

7-7: 💡 Codebase verification

Release version 2025.1 appears to be set too far in the future

Based on the search results showing release versions from other integrations (ranging from 0.31 to 2023.2), setting the release version to 2025.1 seems unusually far ahead. The most recent release version found is 2023.2, suggesting that 2025.1 is likely a placeholder that needs to be adjusted to align with the actual planned release schedule.

🔗 Analysis chain

Verify the release version

The release version is set to 2025.1, which seems unusually far in the future. Please confirm if this is intentional or if it should be adjusted to match the actual planned release version.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check other integration files for typical release version patterns
rg "ha_release:" source/_integrations/ | sort -r | head -n 5

Length of output: 347

source/_integrations/powerfox.markdown (2)

79-81: 🛠️ Refactor suggestion

Enhance troubleshooting section

Consider adding:

  • Common setup issues and their solutions
  • Debug logging instructions
  • API connection troubleshooting steps
  • Steps to verify device compatibility

7-7: 💡 Codebase verification

Release version 2025.1 is too far in the future

The release version 2025.1 appears to be set incorrectly. Based on the repository data, the most recent integration releases are from 2023, with no integrations currently marked for 2024 or beyond. This suggests the version number should be adjusted to align with the upcoming release schedule.

  • Consider updating to a more immediate upcoming version
  • Latest integration releases in the repository are from 2023.2
🔗 Analysis chain

Verify the release version

The release version 2025.1 seems unusually far in the future. Please verify if this is the intended version number for this integration.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check current and upcoming versions in the repository
rg -g "*.markdown" "ha_release: 202[0-9]\.[0-9]+" source/_integrations/ | sort | tail -n 5

Length of output: 382

plugins/icon.rb (1)

33-34: ⚠️ Potential issue

Fix potential XSS vulnerability by escaping the title attribute

The title attribute uses user-supplied input from @title, which may lead to Cross-Site Scripting (XSS) attacks if not properly escaped. Ensure that the title is properly escaped before inserting it into the HTML.

Apply this diff to escape the title using CGI.escapeHTML:

+require 'cgi'

def render(_context)
  title = @title || default_title(@icon)
+ title = CGI.escapeHTML(title)
  "<iconify-icon inline icon='#{@icon}' title='#{title}'></iconify-icon>"

Ensure that the cgi library is required at the beginning of the file.

Committable suggestion skipped: line range outside the PR's diff.

@frenck frenck removed request for a team, frenck, Danielhiversen and bdraco December 16, 2024 18:31
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

✅ Approved. Can be merged as soon as the parent PR gets merged.

@frenck frenck added the awaits-parent Awaits the merge of an parent PR label Dec 16, 2024
@home-assistant home-assistant bot added the parent-merged The parent PR has been merged already label Dec 20, 2024
@joostlek joostlek merged commit 8242e00 into home-assistant:next Dec 20, 2024
7 checks passed
@home-assistant home-assistant bot removed in-progress This PR/Issue is currently being worked on awaits-parent Awaits the merge of an parent PR parent-merged The parent PR has been merged already labels Dec 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2024
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 a other repo next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants