Update yaml.markdown (#14818)

Component is an old terminology - be consistent in using integration now.
Make the inline warning about duplicate value more prominent.
This commit is contained in:
zmarties 2020-10-03 10:52:13 +01:00 committed by GitHub
parent 455220b1e9
commit 0a270b2729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ Home Assistant uses the [YAML](https://yaml.org/) syntax for configuration. YAML
For integrations that you want to use in Home Assistant, you add code in your `configuration.yaml` file to specify its settings. This especially applies to integrations that are not yet available to configure through the UI.
The following example entry assumes that you would like to set up the [notify component](/integrations/notify) with the [pushbullet platform](/integrations/pushbullet).
The following example entry assumes that you would like to set up the [notify integration](/integrations/notify) with the [pushbullet platform](/integrations/pushbullet).
```yaml
notify:
@ -16,12 +16,12 @@ notify:
name: pushbullet
```
- A **component** provides the core logic for some functionality (like `notify` provides sending notifications).
- An **integration** provides the core logic for some functionality (like `notify` provides sending notifications).
- A **platform** makes the connection to a specific software or hardware platform (like `pushbullet` works with the service from pushbullet.com).
The basics of YAML syntax are block collections and mappings containing key-value pairs. Each item in a collection starts with a `-` while mappings have the format `key: value`. If you specify duplicate keys, the last value for a key is used. This is somewhat similar to a Hash table or more specifically a dictionary in Python. These can be nested as well.
The basics of YAML syntax are block collections and mappings containing key-value pairs. Each item in a collection starts with a `-` while mappings have the format `key: value`. This is somewhat similar to a Hash table or more specifically a dictionary in Python. These can be nested as well. **Beware that if you specify duplicate keys, the last value for a key is used**.
Note that indentation is an important part of specifying relationships using YAML. Things that are indented are nested "inside" things that are one level higher. So in the above example, `platform: pushbullet` is a property of (nested inside) the `notify` component.
Note that indentation is an important part of specifying relationships using YAML. Things that are indented are nested "inside" things that are one level higher. So in the above example, `platform: pushbullet` is a property of (nested inside) the `notify` integration.
Getting the right indentation can be tricky if you're not using an editor with a fixed width font. Tabs are not allowed to be used for indentation. Convention is to use 2 spaces for each level of indentation.
@ -63,7 +63,7 @@ sensor:
## Including values
### Environmental variables
### Environment variables
On Home Assistant Core installations, you can include values from your system's environment variables with `!env_var`.
Note that this will only work for Home Assistant Core installations, in a scenario where it is possible to specify these.