mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user