mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Don't error on removal of an ignored homekit_controller config entry (#30083)
* Don't error on ignored entries * Don't ever call async_remove_entry or async_unload_entry for an unignored ignore config entry
This commit is contained in:
parent
b3098c9f2c
commit
4ef04840e9
@ -246,6 +246,10 @@ class ConfigEntry:
|
||||
|
||||
Returns if unload is possible and was successful.
|
||||
"""
|
||||
if self.source == SOURCE_IGNORE:
|
||||
self.state = ENTRY_STATE_NOT_LOADED
|
||||
return True
|
||||
|
||||
if integration is None:
|
||||
integration = await loader.async_get_integration(hass, self.domain)
|
||||
|
||||
@ -292,6 +296,9 @@ class ConfigEntry:
|
||||
|
||||
async def async_remove(self, hass: HomeAssistant) -> None:
|
||||
"""Invoke remove callback on component."""
|
||||
if self.source == SOURCE_IGNORE:
|
||||
return
|
||||
|
||||
integration = await loader.async_get_integration(hass, self.domain)
|
||||
component = integration.get_component()
|
||||
if not hasattr(component, "async_remove_entry"):
|
||||
|
Loading…
x
Reference in New Issue
Block a user