Configuration.yaml


While you can configure most of Home Assistant directly from the user interface under Settings, some parts need you to edit configuration.yaml. This file contains integrationsIntegrations connect and integrate Home Assistant with your devices, services, and more.
[Learn more]
to be loaded along with their configurations. Throughout the documentation you will find snippets that you can add to your configuration file to enable specific functionality.

If you run into trouble while configuring Home Assistant, refer to the configuration troubleshooting page and the configuration.yaml examples.

Editing configuration.yaml

The easiest option to edit configuration.yaml is to use the Studio Code Server add-on. This add-on runs VS Code, which offers live syntax checking and auto-fill of various Home Assistant entities. See here for details. If unavailable on your system, use File Editor add-on instead. Again, details can be found here.

If you prefer to use a file editor on your computer, use the Samba add-on to access the files as a network share. More details can be found here.

The path to your configuration directory can be found in the Home Assistant frontendThe frontend is a necessary component for the UI, it is also where you can define your themes.
[Learn more]
by going to Settings > System > Repairs > System information from the top right menu

Show system menu option

Right under the version you are running, you will find what path Home Assistant has loaded the configuration from. Screenshot showing the top of the system information panel

If you use Home Assistant Container, you can find configuration.yaml in the config folder that you mounted in your container.

If you use Home Assistant Operating System, you can find configuration.yaml in the /config folder of the installation.

If you use Home Assistant Core, you can find configuration.yaml in the config folder passed to the hass command (default is ~/.homeassistant).

Reloading changes

Most integrations in Home Assistant that do not interact with devicesA device is a model representing a physical or logical unit that contains entities. or servicesA service carries out one specific task, for example: turn on the light in the living room. A service has targets and data and can be called by actions, a dashboard, or via voice command.
[Learn more]
can reload changes made to their configuration in configuration.yaml. To do this, go to Developer Tools > YAML and scroll down to the YAML configuration reloading section (alternatively, hit “c” anywhere in the UI and search for it).

If you can’t see your integration listed there, you will need to restart Home Assistant for changes to take effect.

To test any changes to your configuration files from the command line, check out the common tasks for operating system, supervised, container, core for how to do that. Configuration changes can also be tested using the UI by navigating to Developer Tools > YAML and clicking “Check Configuration”. For the button to be visible, you must enable “Advanced Mode” on your User Profile.

Migrating to a new system

The preferred way of migrating to a new system is by making a backup. Once you have created the backup on the old system, you can download it to the system that is running the Home Assistant frontend. When setting up the new system, you may use the backup. Alternatively, you can upload it to your new system using the Upload backup menu option of the Backups menu. Then, a restore of the uploaded backup on the new system concludes the migration.

If you run the container or core installation methods, you will need to manually make a backup of your configuration folder. Be aware that some of the files you need start with ., which is hidden by default from both ls (in SSH), in Windows Explorer, and macOS Finder. You’ll need to ensure that you’re viewing all files before you copy them.