Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@ludeeus
Copy link
Member

@ludeeus ludeeus commented Jul 5, 2025

Closes #4600

Copilot AI review requested due to automatic review settings July 5, 2025 08:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a new function to remove HACS config entries from devices, with validation and error handling, addressing issue #4600.

  • Imported HomeAssistantError and DeviceEntry to support new removal logic.
  • Switched legacy comment markers from ## to # for consistency.
  • Implemented async_remove_config_entry_device to validate identifiers and prevent removal of core or downloaded repositories.
Comments suppressed due to low confidence (2)

custom_components/hacs/init.py:249

  • [nitpick] The error message refers to "service", but this function is removing config entries from devices. Consider rephrasing to "Cannot remove config entry from device {device_entry.id}, no valid HACS repository identifier found." for clarity.
            f"Cannot remove service {device_entry.id}, no valid HACS repository identifier found."

custom_components/hacs/init.py:234

  • This new function has multiple conditional branches and currently lacks tests. Please add unit tests covering cases such as missing identifiers, system ID checks, downloaded repositories, and successful removal.
async def async_remove_config_entry_device(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A removed integration still shows on the list

2 participants