Skip to content

Commit d90c4a4

Browse files
committed
Minor changes
1 parent 07c7a41 commit d90c4a4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

source/_topics/packages.markdown

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ sharing: true
99
footer: true
1010
---
1111

12-
## {% linkable_title About %}
13-
14-
Packages in Home Assistant provides a way to bundle different component's configuration together. We were already introduced to the two configuration styles (specifying platforms entries together or individually) on the [adding devices](/getting-started/devices) page. Both of these configuration methods require you to create the component key in the main `configuration.yaml` file. With packages we have a way to include different components, or parts of configuration using any of the `!include` directives introduced in [splitting the configuration](/topics/splitting_configuration).
12+
Packages in Home Assistant provides a way to bundle different component's configuration together. We were already introduced to the two configuration styles (specifying platforms entries together or individually) on the [adding devices](/getting-started/devices/) page. Both of these configuration methods require you to create the component key in the main `configuration.yaml` file. With packages we have a way to include different components, or parts of configuration using any of the `!include` directives introduced in [splitting the configuration](/topics/splitting_configuration).
1513

1614
Packages are configured under the core `homeassistant/packages` in the configuration and take the format of a packages name (no spaces, all lower case) followed by a dictionary with the package config. For example, package `pack_1` would be created as:
1715

@@ -20,12 +18,12 @@ homeassistant:
2018
...
2119
packages:
2220
pack_1:
23-
...package config here...
21+
...package configuration here...
2422
```
2523
2624
The package configuration can include: `switch`, `light`, `automation`, `groups` or the majority of the Home Assistant components.
2725

28-
It can be specified inline, or in a seperate yaml file using `!include`
26+
It can be specified inline, or in a seperate YAML file using `!include`
2927

3028
Inline example, main `configuration.yaml`:
3129

@@ -43,13 +41,16 @@ homeassistant:
4341
```
4442

4543
Include example, main `configuration.yaml`:
44+
4645
```yaml
4746
homeassistant:
4847
...
4948
packages:
5049
pack_1: !include my_package.yaml
5150
```
51+
5252
The file `my_package.yaml` contains the "top-level" configuration:
53+
5354
```
5455
switch:
5556
- platform: rest
@@ -73,20 +74,18 @@ There are some rules for packages that will be merged:
7374
```
7475
4. Any component that is not a platform [2], or dictionaries with Entity ID keys [3] cannot be merged and can only occur once between all packages and the main config
7576

76-
7777
<p class='note tip'>
7878
Components inside packages can only specify platform entries using configuration style 1, where all the platforms are grouped under the component name.
7979
</p>
8080

81-
8281
### {% linkable_title Create a packages folder %}
8382

84-
One way to organise packages would be to create a folder named "packages" in your Home Assistant configuration directory. In the packages directory you can store any number of packages in a yaml file. This entry in your `configuration.yaml` will load all packages:
83+
One way to organise packages would be to create a folder named "packages" in your Home Assistant configuration directory. In the packages directory you can store any number of packages in a YAML file. This entry in your `configuration.yaml` will load all packages:
8584

8685
```yaml
8786
homeassistant:
8887
packages: !include_dir_named packages
8988
```
9089

9190
This uses the concept splitting the configuration and will include all files in a directory with the keys representing the filenames.
92-
See the documentation about [splitting the configuration](/topics/splitting_configuration) for more information about `!include_dir_named` and other include statements that might be helpful.
91+
See the documentation about [splitting the configuration](/topics/splitting_configuration/) for more information about `!include_dir_named` and other include statements that might be helpful.

0 commit comments

Comments
 (0)