Configuration.yaml


While you can configure most of Home Assistant from the user interface, for some integrations, you need to edit the configuration.yaml file. 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.

Screenshot of an example of a configuration.yaml file, accessed using the File editor add-on on a Home Assistant Operating System installation. Example of a configuration.yaml file, accessed using the File editor add-on on a Home Assistant Operating System installation.

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 ContainerHome Assistant Container is a standalone container-based installation of Home Assistant Core. Any OCI compatible runtime can be used, but the documentation focus is on Docker.
[Learn more]
, you can find configuration.yaml in the config folder that you mounted in your container.

If you use Home Assistant Operating SystemHome Assistant OS, the Home Assistant Operating System, is an embedded, minimalistic, operating system designed to run the Home Assistant ecosystem. It is the recommended installation method for most users.
[Learn more]
, you can find configuration.yaml in the /config folder of the installation.

If you use Home Assistant CoreHome Assistant Core is the heart of Home Assistant itself. It is a Python program that powers every installation type, but can be installed standalone.
[Learn more]
, you can find configuration.yaml in the config folder passed to the hass command (default is ~/.homeassistant).

Validating the configuration

After changing configuration or automation files, you can check if the configuration is valid. A configuration check is also applied automatically when you reload the configuration or when you restart Home Assistant.

The method for running a configuration check depends on your installation type. Check the common tasks for your installation type:

Reloading the configuration to apply changes

For configuration changes to become effective, the configuration must be reloaded. 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 without needing to restart Home Assistant.

  1. Under Settings, select the three dots menu (top right), select Restart Home Assistant > Quick reload.

    Settings, three dot menu, restart Home Assistant

  2. If you find that your changes were not applied, you need to restart.

    • Select Restart Home Assistant.
    • Note: This interrupts automations and scripts.

    Reload and restart buttons

Troubleshooting the configuration

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