Add support for passing though description_placeholders to _abort_if_unique_id_configured (#142779)

This commit is contained in:
J. Nick Koston
2025-04-12 07:47:02 -10:00
committed by GitHub
parent 3489ea30dd
commit f13bdd0da4
2 changed files with 11 additions and 3 deletions

View File

@@ -2913,6 +2913,7 @@ class ConfigFlow(ConfigEntryBaseFlow):
reload_on_update: bool = True,
*,
error: str = "already_configured",
description_placeholders: Mapping[str, str] | None = None,
) -> None:
"""Abort if the unique ID is already configured.
@@ -2953,7 +2954,7 @@ class ConfigFlow(ConfigEntryBaseFlow):
return
if should_reload:
self.hass.config_entries.async_schedule_reload(entry.entry_id)
raise data_entry_flow.AbortFlow(error)
raise data_entry_flow.AbortFlow(error, description_placeholders)
async def async_set_unique_id(
self, unique_id: str | None = None, *, raise_on_progress: bool = True