You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[NEW FEATURE] Add addons to available variables (#15)
* Remove dependency to get_hacs() method, which was removed in hacs 0.19.0
* Set hacs version in hacs.json and fix CR suggestions
* Introduce new variable addons with the list of installed HA addons
* Update the default template and README
* Apply suggestions from code review
Co-authored-by: Joakim Sørensen <[email protected]>
Co-authored-by: Joakim Sørensen <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+43-25Lines changed: 43 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,18 +11,15 @@
11
11
[![Discord][discord-shield]][discord]
12
12
[![Community Forum][forum-shield]][forum]
13
13
14
-
_Use Jinja and data from Home Assistant to generate your README.md file_
14
+
_Use Jinja and data from Home Assistant to generate your README.md file
15
+
with the list of all your installed add-ons and custom components_
15
16
16
17
17
18
## Installation
18
19
19
-
1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`).
20
-
2. If you do not have a `custom_components` directory (folder) there, you need to create it.
21
-
3. In the `custom_components` directory (folder) create a new folder called `readme`.
22
-
4. Download _all_ the files from the `custom_components/readme/` directory (folder) in this repository.
23
-
5. Place the files you downloaded in the new directory (folder) you created.
24
-
6. Restart Home Assistant
25
-
7. Choose:
20
+
1. Download it with HACS
21
+
2. Restart Home Assistant
22
+
3. Choose:
26
23
- Add `readme:` to your HA configuration.
27
24
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Generate readme"
28
25
@@ -65,13 +62,16 @@ When you are happy with how the template look, run the service `readme.generate`
65
62
66
63
## Usable variables
67
64
68
-
In addition to all [Jijna magic you can do](https://jinja.palletsprojects.com/en/2.10.x/templates/), there is also some additional variables you can use in the templates.
65
+
In addition to all [Jinja magic you can do](https://jinja.palletsprojects.com/en/2.10.x/templates/), there is also some additional variables you can use in the templates.
69
66
70
67
Variable | Description
71
68
-- | --
72
69
`states`| This is the same as with the rest of Home Assistant.
73
70
`custom_components`| Gives you a list of information about your custom_integrations
74
71
`hacs_components`| Gives you a list of information about HACS installed integrations, plugins, and themes
72
+
`addons`| List of installed Home Assistant Add-ons
73
+
74
+
### custom_components
75
75
76
76
The information about custom integrations are fetched from the integrations manifest.json file, the folowing keys are available:
77
77
@@ -81,14 +81,6 @@ The information about custom integrations are fetched from the integrations mani
81
81
- `codeowners`
82
82
- `version`
83
83
84
-
The information about integrations tracked with HACS are fetched from the storage hacs files, the folowing keys are available:
85
-
86
-
- `category`
87
-
- `name`
88
-
- `documentation`
89
-
- `authors`
90
-
- `description`
91
-
92
84
**Example usage of the `custom_components` variable:**
0 commit comments