mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Adjust check config documentation (#18411)
This commit is contained in:
parent
a56e917892
commit
b1a0c1ec45
@ -189,15 +189,14 @@ That about wraps it up.
|
|||||||
|
|
||||||
If you have issues checkout `home-assistant.log` in the configuration directory as well as your indentations. If all else fails, head over to our [Discord chat server][discord] and ask away.
|
If you have issues checkout `home-assistant.log` in the configuration directory as well as your indentations. If all else fails, head over to our [Discord chat server][discord] and ask away.
|
||||||
|
|
||||||
## Debugging multiple configuration files
|
## Debugging configuration files
|
||||||
|
|
||||||
If you have many configuration files, the `check_config` script allows you to see how Home Assistant interprets them:
|
If you have many configuration files, Home Assistant provides a CLI that allows you to see how it interprets them, each installation type has it's own section in the common-tasks about this:
|
||||||
|
|
||||||
- Listing all loaded files: `hass --script check_config --files`
|
- [Operating System](/common-tasks/os/#configuration-check)
|
||||||
- Viewing a component's configuration: `hass --script check_config --info light`
|
- [Container](/common-tasks/container/#configuration-check)
|
||||||
- Or all components' configuration: `hass --script check_config --info all`
|
- [Core](/common-tasks/core/#configuration-check)
|
||||||
|
- [Supervised](/common-tasks/supervised/#configuration-check)
|
||||||
You can get help from the command line using: `hass --script check_config --help`
|
|
||||||
|
|
||||||
## Advanced Usage
|
## Advanced Usage
|
||||||
|
|
||||||
|
@ -19,9 +19,12 @@ If you have incorrect entries in your configuration files you can use the config
|
|||||||
|
|
||||||
One of the most common problems with Home Assistant is an invalid `configuration.yaml` or other configuration file.
|
One of the most common problems with Home Assistant is an invalid `configuration.yaml` or other configuration file.
|
||||||
|
|
||||||
- With Home Assistant OS and Supervised you can use the [`ha` command](/hassio/commandline/#home-assistant): `ha core check`.
|
- Home Assistant provides a CLI that allows you to see how it interprets them, each installation type has it's own section in the common-tasks about this:
|
||||||
- You can test your configuration with Home Assistant Core using the command line with: `hass --script check_config`. If you need to provide the path for your configuration you can do this using the `-c` argument like this: `hass --script check_config -c /path/to/your/config/dir`.
|
- [Operating System](/common-tasks/os/#configuration-check)
|
||||||
- On Docker you can use `docker exec home-assistant python -m homeassistant --script check_config --config /config` - where `home-assistant` is the name of the container.
|
- [Container](/common-tasks/container/#configuration-check)
|
||||||
|
- [Core](/common-tasks/core/#configuration-check)
|
||||||
|
- [Supervised](/common-tasks/supervised/#configuration-check)
|
||||||
|
|
||||||
- The configuration files, including `configuration.yaml` must be UTF-8 encoded. If you see error like `'utf-8' codec can't decode byte`, edit the offending configuration and re-save it as UTF-8.
|
- The configuration files, including `configuration.yaml` must be UTF-8 encoded. If you see error like `'utf-8' codec can't decode byte`, edit the offending configuration and re-save it as UTF-8.
|
||||||
- You can verify your configuration's YAML structure using [this online YAML parser](http://yaml-online-parser.appspot.com/) or [YAML Lint](http://www.yamllint.com/).
|
- You can verify your configuration's YAML structure using [this online YAML parser](http://yaml-online-parser.appspot.com/) or [YAML Lint](http://www.yamllint.com/).
|
||||||
- To learn more about the quirks of YAML, read [YAML IDIOSYNCRASIES](https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html) by SaltStack (the examples there are specific to SaltStack, but do explain YAML issues well).
|
- To learn more about the quirks of YAML, read [YAML IDIOSYNCRASIES](https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html) by SaltStack (the examples there are specific to SaltStack, but do explain YAML issues well).
|
||||||
|
@ -6,4 +6,9 @@ ha_category: Configuration
|
|||||||
|
|
||||||
When an integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the `home-assistant.log` file and see if there are any errors related to your integration you are trying to set up.
|
When an integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the `home-assistant.log` file and see if there are any errors related to your integration you are trying to set up.
|
||||||
|
|
||||||
If you have incorrect entries in your configuration files you can use the `check_config` script to assist in identifying them: `hass --script check_config`.
|
If you have incorrect entries in your configuration files you can use the CLI script to check your configuration, each installation type has it's own section in the common-tasks about this:
|
||||||
|
|
||||||
|
- [Operating System](/common-tasks/os/#configuration-check)
|
||||||
|
- [Container](/common-tasks/container/#configuration-check)
|
||||||
|
- [Core](/common-tasks/core/#configuration-check)
|
||||||
|
- [Supervised](/common-tasks/supervised/#configuration-check)
|
@ -8,11 +8,37 @@ ha core check
|
|||||||
|
|
||||||
{% elsif page.installation == "container" %}
|
{% elsif page.installation == "container" %}
|
||||||
|
|
||||||
|
_If your container name is something other than `homeassistant`, change that part in the examples below._
|
||||||
|
|
||||||
|
Run the full check:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker exec homeassistant python -m homeassistant --script check_config --config /config
|
docker exec homeassistant python -m homeassistant --script check_config --config /config
|
||||||
```
|
```
|
||||||
|
|
||||||
_If your container name is something other than `homeassistant`, change that part._
|
Listing all loaded files:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec homeassistant python -m homeassistant --script check_config --files
|
||||||
|
```
|
||||||
|
|
||||||
|
Viewing a component’s configuration ([`light`](/integrations/light) in this example):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec homeassistant python -m homeassistant --script check_config --info light
|
||||||
|
```
|
||||||
|
|
||||||
|
Or all components’ 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" %}
|
{% elsif page.installation == "core" %}
|
||||||
|
|
||||||
@ -30,10 +56,36 @@ _If your container name is something other than `homeassistant`, change that par
|
|||||||
|
|
||||||
3. Run the configuration check
|
3. Run the configuration check
|
||||||
|
|
||||||
|
Run the full check:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
hass --script check_config
|
hass --script check_config
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Listing all loaded files:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
hass --script check_config --files
|
||||||
|
```
|
||||||
|
|
||||||
|
Viewing a component’s configuration ([`light`](/integrations/light) in this example):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
hass --script check_config --info light
|
||||||
|
```
|
||||||
|
|
||||||
|
Or all components’ 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.
|
4. When that is complete restart the service for it to use the new files.
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user