Skip check for entry updated by current flow in _async_abort_entries_match (#141003)

* Ignore entries with source reconfigure in _async_abort_entries_match

* Exclude reconfigure and reauth entry from match check

* Add tests

* Fix tests for other components

* Revert unrelated changes

* Update docstring

* Make test more realistic

* Change name and docstring for sabnzbd test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
Andre Lengwenus
2025-05-09 16:15:17 +02:00
committed by GitHub
parent 3e0e807c96
commit b6c4b06fc7
4 changed files with 57 additions and 5 deletions

View File

@@ -2839,10 +2839,16 @@ class ConfigFlow(ConfigEntryBaseFlow):
) -> None:
"""Abort if current entries match all data.
Do not abort for the entry that is being updated by the current flow.
Requires `already_configured` in strings.json in user visible flows.
"""
_async_abort_entries_match(
self._async_current_entries(include_ignore=False), match_dict
[
entry
for entry in self._async_current_entries(include_ignore=False)
if entry.entry_id != self.context.get("entry_id")
],
match_dict,
)
@callback