Reword section on editing configuration.yaml file (#32472)

This commit is contained in:
c0ffeeca7 2024-04-29 23:38:56 +02:00 committed by GitHub
parent 404ba82bf1
commit f762285e48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 9 deletions

View File

@ -12,6 +12,10 @@ related:
title: Creating backups for Home Assistant Container and Core
- docs: /docs/tools/dev-tools/#reloading-the-yaml-configuration
title: Reloading the YAML configuration from developer tools
- docs: /common-tasks/os/#configuring-access-to-files
title: Configuring file access on the Operating System
- docs: /common-tasks/supervised/#configuring-access-to-files
title: Configuring file access on Supervised
- docs: docs/configuration/troubleshooting/
title: Troubleshooting the configuration
---
@ -25,22 +29,36 @@ Example of a configuration.yaml file, accessed using the File editor add-on on a
## Editing `configuration.yaml`
The easiest option to edit `configuration.yaml` is to use the {% my supervisor_addon title="Studio Code Server add-on" addon="a0d7b954_vscode" %}. This add-on runs VS Code, which offers live syntax checking and auto-fill of various Home Assistant entities. See [here](/common-tasks/supervised/#installing-and-using-the-visual-studio-code-vsc-add-on) for details. If unavailable on your system, use {% my supervisor_addon title="File Editor add-on" addon="core_configurator" %} instead. Again, details can be found [here](/common-tasks/supervised/#installing-and-using-the-file-editor-add-on).
How you edit your `configuration.yaml` file depends on your editor preferences and the [installation method](/installation/#advanced-installation-methods) you used to set up Home Assistant.
If you prefer to use a file editor on your computer, use the {% my supervisor_addon title="Samba add-on" addon="core_samba" %} to access the files as a network share. More details can be found [here](/common-tasks/supervised/#installing-and-using-the-samba-add-on).
### To set up access to the files and prepare an editor
The path to your configuration directory can be found in the Home Assistant {% term frontend %} by going to {% my system_health title="Settings > System > Repairs > System information from the top right menu" %}
Before you can edit a file, you need to know how to access files in Home Assistant and setup an editor.
File access depends on your [installation method](/installation/#advanced-installation-methods). If you use {% term "Home Assistant Operating System" %} or {% term "Home Assistant Supervised" %}, you can use editor add-ons, for example, but not if you use {% term "Home Assistant Core" %} or {% term "Home Assistant Container" %}.
![Show system menu option](/images/screenshots/System_information_menu.png)
1. To set up file access, follow the steps for your [installation method](/installation/#advanced-installation-methods):
- [Configuring file access on the Operating System](/common-tasks/os/#configuring-access-to-files)
- If you are unsure which option to choose, install the [file editor add-on](/common-tasks/os/#installing-and-using-the-file-editor-add-on).
- Alternatively, use the [VS Code add-on](/common-tasks/os/#installing-and-using-the-visual-studio-code-vsc-add-on). This editor offers live syntax checking and auto-fill of various Home Assistant entities. But it looks more complex than the file editor.
- If you prefer to use a file editor on your computer, use the [Samba add-on](/common-tasks/os/#installing-and-using-the-samba-add-on).
- [Configuring file access on Supervised](/common-tasks/supervised/#configuring-access-to-files)
- [File editor add-on](/common-tasks/supervised/#installing-and-using-the-file-editor-add-on).
- [VS Code add-on](/common-tasks/supervised/#installing-and-using-the-visual-studio-code-vsc-add-on).
- [Samba add-on](/common-tasks/supervised/#installing-and-using-the-samba-add-on).
2. To look up the to your configuration directory, go to {% my system_health title="**Settings** > **System** > **Repairs**" %}.
- Select the three dots menu and select **System information**.
![Show system information option](/images/screenshots/System_information_menu.png)
3. Find out the location of the **Configuration directory**.
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](/images/screenshots/System_information.png)
_If you use {% term "Home Assistant Container" %}, you can find `configuration.yaml` in the config folder that you mounted in your container._
_If you use {% term "Home Assistant Operating System" %}, you can find `configuration.yaml` in the `/config` folder of the installation._
_If you use {% term "Home Assistant Core" %} , you can find `configuration.yaml` in the config folder passed to the `hass` command (default is `~/.homeassistant`)._
- Unless you changed the file structure, the default is as follows: -
- {% term "Home Assistant Operating System" %}: the `configuration.yaml` is in the `/config` folder of the installation.
- {% term "Home Assistant Container" %}: the `configuration.yaml` is in the config folder that you mounted in your container.
- {% term "Home Assistant Core" %}: the `configuration.yaml` is in the config folder passed to the `hass` command (default is `~/.homeassistant`).
## Validating the configuration

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB