Refactor data entry flow (#15883)
* Refactoring data_entry_flow and config_entry_flow Move SOURCE_* to config_entries Change data_entry_flow.FlowManager.async_init() source param default to None Change this first step_id as source or init if source is None _BaseFlowManagerView pass in SOURCE_USER as default source * First step of data entry flow decided by _async_create_flow() now * Lint * Change helpers.config_entry_flow.DiscoveryFlowHandler default step * Change FlowManager.async_init source param to context dict param
This commit is contained in:
parent
39d19f2183
commit
f58425dd3c
25 changed files with 128 additions and 79 deletions
|
@ -51,7 +51,8 @@ class HueBridge:
|
|||
# linking procedure. When linking succeeds, it will remove the
|
||||
# old config entry.
|
||||
hass.async_add_job(hass.config_entries.flow.async_init(
|
||||
DOMAIN, source='import', data={
|
||||
DOMAIN, context={'source': config_entries.SOURCE_IMPORT},
|
||||
data={
|
||||
'host': host,
|
||||
}
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue