# Config flow

> The steps in the UI that set up an integration and create a config entry.

Source: https://contributors.home-assistant.io/glossary/config-flow/

- In code: `ConfigFlow`, `config_flow.py`, `async_step_user`
- Also: config flows

A config flow asks the user for what it needs, like a host and a password, checks it, and creates a [config entry](https://contributors.home-assistant.io/glossary/config-entry/). It sets a [unique ID](https://contributors.home-assistant.io/glossary/unique-id/), so the same device can't be added twice.

A config flow can also start by itself, when a device is [discovered](https://contributors.home-assistant.io/glossary/discovery/). The user then only confirms.

New integrations that connect to a device or service are set up with a config flow, not with YAML.

## Related terms

- [Config entry](https://contributors.home-assistant.io/glossary/config-entry/): One set-up instance of an integration, like one Hue bridge, with the configuration Home Assistant stores for it.
- [Options flow](https://contributors.home-assistant.io/glossary/options-flow/): The steps in the UI that change the options of an existing config entry, like how often it polls.
- [Reauthentication](https://contributors.home-assistant.io/glossary/reauthentication/): A flow that asks the user for new credentials when a config entry can no longer log in, without setting it up again.
- [Reconfigure flow](https://contributors.home-assistant.io/glossary/reconfigure-flow/): A flow that changes the settings of a config entry, like its host, without removing and adding it again.
- [Discovery](https://contributors.home-assistant.io/glossary/discovery/): Finding devices and services, like on the network or over Bluetooth, so Home Assistant can offer to set them up.
