mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-30 04:36:51 +00:00
Common tasks: remove configuration check include file
- with Supervisor and Core gone, there is no longer and reuse - move remaining steps into OS and Container file instead As per architecture discussion on home-assistant/architecture#1197, and home-assistant/architecture#1198 https://www.home-assistant.io/blog/2025/05/22/deprecating-core-and-supervised-installation-methods-and-32-bit-systems
This commit is contained in:
parent
88b53742c7
commit
28d69e8598
@ -1,109 +0,0 @@
|
||||
## Configuration check
|
||||
|
||||
{% if page.installation == "os" or page.installation == "supervised" %}
|
||||
|
||||
After changing configuration or automation files, check if the configuration is valid before restarting Home Assistant Core.
|
||||
|
||||
### Running a configuration check from the UI
|
||||
|
||||
1. Go to {% my profile title="your user profile" %} and enable **Advanced Mode**.
|
||||
2. Go to {% my server_controls title="**Developer tools** > **YAML**" %} and in the **Configuration validation** section, select the **Check configuration** button.
|
||||
- This is to make sure there are no syntax errors before restarting Home Assistant.
|
||||
- It checks for valid {% term YAML %} and valid config structures.
|
||||
3. If you need to do a more comprehensive configuration check, [run the check from the CLI](#to-run-a-configuration-check-from-the-cli).
|
||||
|
||||
### Running a configuration check from the CLI
|
||||
|
||||
Use the following command to check if the configuration is valid. The command line configuration check validates the {% term YAML %} files and checks for valid config structures, as well as some other elements.
|
||||
|
||||
```bash
|
||||
ha core check
|
||||
```
|
||||
|
||||
{% elsif page.installation == "container" %}
|
||||
|
||||
After changing configuration files, check if the configuration is valid before restarting Home Assistant Core.
|
||||
|
||||
_If your container name is something other than `homeassistant`, change that part in the examples below._
|
||||
|
||||
Run the full check:
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --config /config
|
||||
```
|
||||
|
||||
Listing all loaded files:
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --files
|
||||
```
|
||||
|
||||
Viewing an integration’s configuration ([`light`](/integrations/light) in this example):
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --info light
|
||||
```
|
||||
|
||||
Or all integrations’ configuration
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --info all
|
||||
```
|
||||
|
||||
You can get help from the command line using:
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --help
|
||||
```
|
||||
|
||||
{% elsif page.installation == "core" %}
|
||||
|
||||
After changing configuration files, check if the configuration is valid before restarting Home Assistant Core.
|
||||
|
||||
1. Switch to the user that is running Home Assistant.
|
||||
|
||||
```bash
|
||||
sudo -u homeassistant -H -s
|
||||
```
|
||||
|
||||
2. Activate the virtual environment that Home Assistant is running in.
|
||||
|
||||
```bash
|
||||
source /srv/homeassistant/bin/activate
|
||||
```
|
||||
|
||||
3. Run the configuration check.
|
||||
|
||||
Run the full check:
|
||||
|
||||
```bash
|
||||
hass --script check_config
|
||||
```
|
||||
|
||||
Listing all loaded files:
|
||||
|
||||
```bash
|
||||
hass --script check_config --files
|
||||
```
|
||||
|
||||
Viewing a integration’s configuration ([`light`](/integrations/light) in this example):
|
||||
|
||||
```bash
|
||||
hass --script check_config --info light
|
||||
```
|
||||
|
||||
Or all integrations’ configuration
|
||||
|
||||
```bash
|
||||
hass --script check_config --info all
|
||||
```
|
||||
|
||||
You can get help from the command line using:
|
||||
|
||||
```bash
|
||||
hass --script check_config --help
|
||||
```
|
||||
|
||||
4. When that is complete, restart the service for it to use the new files.
|
||||
|
||||
{% endif %}
|
@ -14,4 +14,39 @@ To learn how to back up the system or how to restore a system from a backup, ref
|
||||
{% include common-tasks/specific_version.md %}
|
||||
{% include common-tasks/beta_version.md %}
|
||||
{% include common-tasks/development_version.md %}
|
||||
{% include common-tasks/configuration_check.md %}
|
||||
|
||||
## Configuration check
|
||||
|
||||
After changing configuration files, check if the configuration is valid before restarting Home Assistant Core.
|
||||
|
||||
_If your container name is something other than `homeassistant`, change that part in the examples below._
|
||||
|
||||
Run the full check:
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --config /config
|
||||
```
|
||||
|
||||
Listing all loaded files:
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --files
|
||||
```
|
||||
|
||||
Viewing an integration’s configuration ([`light`](/integrations/light) in this example):
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --info light
|
||||
```
|
||||
|
||||
Or all integrations’ configuration
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --info all
|
||||
```
|
||||
|
||||
You can get help from the command line using:
|
||||
|
||||
```bash
|
||||
docker exec homeassistant python -m homeassistant --script check_config --help
|
||||
```
|
||||
|
@ -96,7 +96,26 @@ Alternatively, if the Operating Systems runs on a platform that uses the GRUB bo
|
||||
{% include common-tasks/network_storage.md %}
|
||||
{% include common-tasks/lost_password.md %}
|
||||
{% include common-tasks/third-party-addons.md %}
|
||||
{% include common-tasks/configuration_check.md %}
|
||||
|
||||
## Configuration check
|
||||
|
||||
After changing configuration or automation files, check if the configuration is valid before restarting Home Assistant Core.
|
||||
|
||||
### Running a configuration check from the UI
|
||||
|
||||
1. Go to {% my profile title="your user profile" %} and enable **Advanced Mode**.
|
||||
2. Go to {% my server_controls title="**Developer tools** > **YAML**" %} and in the **Configuration validation** section, select the **Check configuration** button.
|
||||
- This is to make sure there are no syntax errors before restarting Home Assistant.
|
||||
- It checks for valid {% term YAML %} and valid config structures.
|
||||
3. If you need to do a more comprehensive configuration check, [run the check from the CLI](#to-run-a-configuration-check-from-the-cli).
|
||||
|
||||
### Running a configuration check from the CLI
|
||||
|
||||
Use the following command to check if the configuration is valid. The command line configuration check validates the {% term YAML %} files and checks for valid config structures, as well as some other elements.
|
||||
|
||||
```bash
|
||||
ha core check
|
||||
```
|
||||
|
||||
## Home Assistant versions
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user