8000 Add async_remove_config_entry_device function by ludeeus · Pull Request #4690 · hacs/integration · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dismiss alert

Add async_remove_config_entry_device function #4690

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ludeeus
Copy link
Member
@ludeeus ludeeus commented Jul 5, 2025

Closes #4600

@Copilot Copilot AI review requested due to automatic review settings July 5, 2025 08:04
Copy link
@Copilot 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
1 participant
0