You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config_entries_config_flow_handler.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -522,6 +522,75 @@ class ExampleFlow(ConfigFlow):
522
522
)
523
523
```
524
524
525
+
## Use SchemaConfigFlowHandler for simple flows
526
+
527
+
For helpers and integrations with simple config flows, you can use the `SchemaConfigFlowHandler` instead.
528
+
529
+
Compared to using a full config flow, the `SchemaConfigFlowHandler` comes with certain limitations and needs to be considered:
530
+
531
+
- All user input is saved in the `options` dictionary of the resulting config entry. Therefore it's not suitable to use in integrations which uses connection data, api key's or other information that should be stored in the config entry `data`.
532
+
- It may be simpler to use the normal config flow handler if you have extensive validation, setting unique id or checking for duplicated config entries.
533
+
- Starting the flow with other steps besides `user` and `import` is discouraged.
534
+
535
+
```python
536
+
537
+
from homeassistant.helpers.schema_config_entry_flow import (
Integrations with a config flow require full test coverage of all code in `config_flow.py` to be accepted into core. [Test your code](development_testing.md#running-a-limited-test-suite) includes more details on how to generate a coverage report.
0 commit comments