mirror of
https://github.com/home-assistant/core.git
synced 2025-12-27 14:31:13 +00:00
Hide FlowResultType.SHOW_PROGRESS_DONE from frontend (#107799)
* Hide FlowResultType.SHOW_PROGRESS_DONE from frontend * Update tests
This commit is contained in:
@@ -311,6 +311,15 @@ class FlowManager(abc.ABC):
|
||||
|
||||
async def async_configure(
|
||||
self, flow_id: str, user_input: dict | None = None
|
||||
) -> FlowResult:
|
||||
"""Continue a data entry flow."""
|
||||
result: FlowResult | None = None
|
||||
while not result or result["type"] == FlowResultType.SHOW_PROGRESS_DONE:
|
||||
result = await self._async_configure(flow_id, user_input)
|
||||
return result
|
||||
|
||||
async def _async_configure(
|
||||
self, flow_id: str, user_input: dict | None = None
|
||||
) -> FlowResult:
|
||||
"""Continue a data entry flow."""
|
||||
if (flow := self._progress.get(flow_id)) is None:
|
||||
@@ -455,7 +464,7 @@ class FlowManager(abc.ABC):
|
||||
# The flow's progress task was changed, register a callback on it
|
||||
async def call_configure() -> None:
|
||||
with suppress(UnknownFlow):
|
||||
await self.async_configure(flow.flow_id)
|
||||
await self._async_configure(flow.flow_id)
|
||||
|
||||
def schedule_configure(_: asyncio.Task) -> None:
|
||||
self.hass.async_create_task(call_configure())
|
||||
|
||||
Reference in New Issue
Block a user