Fix hue discovery popping up (#14614)

* Fix hue discovery popping up

* Fix result

* Fix tests
This commit is contained in:
Paulus Schoutsen 2018-05-24 14:24:14 -04:00 committed by GitHub
parent 4fb4838bde
commit fa9b9105a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 11 deletions

View file

@ -110,11 +110,11 @@ class FlowManager:
# Abort and Success results both finish the flow
self._progress.pop(flow.flow_id)
if result['type'] == RESULT_TYPE_ABORT:
return result
# We pass a copy of the result because we're mutating our version
result['result'] = await self._async_finish_flow(dict(result))
entry = await self._async_finish_flow(dict(result))
if result['type'] == RESULT_TYPE_CREATE_ENTRY:
result['result'] = entry
return result