Avoid logging a warning when replacing an ignored config entry (#142114)

Replacing an ignored config entry with one from the user
flow should not generate a warning. We should only warn
if we are replacing a usable config entry.

Followup to adjust the warning added in #130567
cc @epenet
This commit is contained in:
J. Nick Koston
2025-04-02 21:38:50 -10:00
committed by GitHub
parent dfa180ba64
commit 0b61b62334
2 changed files with 11 additions and 4 deletions

View File

@ -1612,7 +1612,11 @@ class ConfigEntriesFlowManager(
result["handler"], flow.unique_id
)
if existing_entry is not None and flow.handler != "mobile_app":
if (
existing_entry is not None
and flow.handler != "mobile_app"
and existing_entry.source != SOURCE_IGNORE
):
# This causes the old entry to be removed and replaced, when the flow
# should instead be aborted.
# In case of manual flows, integrations should implement options, reauth,