Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion homeassistant/data_entry_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ async def async_post_init(
def async_progress(self) -> List[Dict]:
"""Return the flows in progress."""
return [
{"flow_id": flow.flow_id, "handler": flow.handler, "context": flow.context}
{
"flow_id": flow.flow_id,
"handler": flow.handler,
"context": flow.context,
"step_id": flow.cur_step["step_id"],
}
for flow in self._progress.values()
if flow.cur_step is not None
]
Expand Down
7 changes: 6 additions & 1 deletion tests/components/config/test_config_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,12 @@ async def async_step_account(self, user_input=None):

assert response["success"]
assert response["result"] == [
{"flow_id": form["flow_id"], "handler": "test", "context": {"source": "hassio"}}
{
"flow_id": form["flow_id"],
"handler": "test",
"step_id": "account",
"context": {"source": "hassio"},
}
]


Expand Down
9 changes: 8 additions & 1 deletion tests/test_data_entry_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ async def async_step_init(self, user_input=None):
assert form["errors"]["base"] == "1"
form = await manager.async_configure(form["flow_id"])
assert form["errors"]["base"] == "2"
assert len(manager.async_progress()) == 1
assert manager.async_progress() == [
{
"flow_id": form["flow_id"],
"handler": "test",
"step_id": "init",
"context": {},
}
]
assert len(manager.mock_created_entries) == 0


Expand Down