Add FlowResultType enum to data entry flow (#72955)

This commit is contained in:
epenet
2022-06-08 07:02:44 +02:00
committed by GitHub
parent 329595bf73
commit f91aa33c5f
11 changed files with 79 additions and 53 deletions

View File

@@ -26,7 +26,7 @@ class _BaseFlowManagerView(HomeAssistantView):
self, result: data_entry_flow.FlowResult
) -> data_entry_flow.FlowResult:
"""Convert result to JSON."""
if result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY:
if result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY:
data = result.copy()
data.pop("result")
data.pop("data")