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
`custom_components/blueprint/__init__.py` | The component file for the integration.
32
-
`custom_components/blueprint/binary_sensor.py` | Binary sensor platform for the integration.
33
-
`custom_components/blueprint/config_flow.py` | Config flow file, this adds the UI configuration possibilities.
34
-
`custom_components/blueprint/const.py` | A file to hold shared variables/constants for the entire integration.
35
-
`custom_components/blueprint/manifest.json` | A [manifest file](https://developers.home-assistant.io/docs/en/creating_integration_manifest.html) for Home Assistant.
36
-
`custom_components/blueprint/sensor.py` | Sensor platform for the integration.
37
-
`custom_components/blueprint/switch.py` | Switch sensor platform for the integration.
38
-
`CONTRIBUTING.md` | Guidelines on how to contribute.
39
-
`example.png` | Screenshot that demonstrate how it might look in the UI.
40
-
`info.md` | An example on a info file (used by [hacs][hacs]).
41
-
`LICENSE` | The license file for the project.
42
-
`README.md` | The file you are reading now, should contain info about the integration, installation and configuration instructions.
43
-
`requirements.txt` | Python packages used by this integration.
44
-
45
-
***
46
-
README content if this was a published component:
47
-
***
48
-
49
-
# blueprint
1
+
# Readme
50
2
51
3
[![GitHub Release][releases-shield]][releases]
52
4
[![GitHub Activity][commits-shield]][commits]
53
5
[![License][license-shield]](LICENSE.md)
54
6
55
-
[![hacs][hacsbadge]][hacs]
7
+
[![hacs][hacsbadge]](hacs)
56
8
![Project Maintenance][maintenance-shield]
57
9
[![BuyMeCoffee][buymecoffeebadge]][buymecoffee]
58
10
59
11
[![Discord][discord-shield]][discord]
60
12
[![Community Forum][forum-shield]][forum]
61
13
62
-
_Component to integrate with [blueprint][blueprint]._
14
+
_Use Jinja and data from Home Assistant to generate your README.md file_
63
15
64
-
**This component will set up the following platforms.**
65
-
66
-
Platform | Description
67
-
-- | --
68
-
`binary_sensor` | Show something `True` or `False`.
69
-
`sensor` | Show info from blueprint API.
70
-
`switch` | Switch something `True` or `False`.
71
-
72
-
![example][exampleimg]
73
16
74
17
## Installation
75
18
76
19
1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`).
77
20
2. If you do not have a `custom_components` directory (folder) there, you need to create it.
78
-
3. In the `custom_components` directory (folder) create a new folder called `blueprint`.
79
-
4. Download _all_ the files from the `custom_components/blueprint/` directory (folder) in this repository.
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.
80
23
5. Place the files you downloaded in the new directory (folder) you created.
81
24
6. Restart Home Assistant
82
25
7. Choose:
83
-
- Add `blueprint:` to your HA configuration.
84
-
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Blueprint"
26
+
- Add `readme:` to your HA configuration.
27
+
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Generate readme"
85
28
86
29
Using your HA configuration directory (folder) as a starting point you should now also have this:
`username` | `string` | `False` | Username for the client.
123
-
`password`| `string` | `False` | Password for the client.
124
-
`binary_sensor`| `list` | `False` | Configuration for the `binary_sensor` platform.
125
-
`sensor`| `list` | `False` | Configuration for the `sensor` platform.
126
-
`switch`| `list` | `False` | Configuration for the `switch` platform.
51
+
`convert_lovelace` | `boolean` | `False` | Generate a `ui.lovelace.yaml` file (only usefull if you use the UI to edit lovelace and want to share that in a yaml format.)
52
+
53
+
## Warnings!
54
+
55
+
This integration **will** replace your files!:
56
+
57
+
- README.md
58
+
- ui-lovelace.yaml (if you enable `convert_lovelace`)
127
59
128
-
### Configuration options for `binary_sensor` list
60
+
## Usage
129
61
130
-
Key | Type | Required | Default | Description
131
-
-- | -- | -- | -- | --
132
-
`enabled`| `boolean` | `False` | `True` | Boolean to enable/disable the platform.
133
-
`name`| `string` | `False` | `blueprint` | Custom name for the entity.
62
+
In the root of your configuration directory (folder) you will get a new directory (folder) called "templates" in that directory (folder) there will be a file called "README.j2" this is where you change the template that will be used for generation of the README.md file.
134
63
135
-
### Configuration options for `sensor` list
64
+
When you are happy with how the template look, run the service `readme.generate` in Home Assistant, this will generate the README.md file, and the ui-lovelace.yaml file if you enabled that.
65
+
66
+
## Usable variables
67
+
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.
69
+
70
+
Variable | Description
71
+
-- | --
72
+
`states`| This is the same as with the rest of Home Assistant.
73
+
`custom_components`| Gives you a list of information about your custom_components
136
74
137
-
Key | Type | Required | Default | Description
138
-
-- | -- | -- | -- | --
139
-
`enabled`| `boolean` | `False` | `True` | Boolean to enable/disable the platform.
140
-
`name`| `string` | `False` | `blueprint` | Custom name for the entity.
75
+
The information about custom components are fetched from the integrations manifest.json file, the folowing keys are aviable:
141
76
77
+
- `domain`
78
+
- `name`
79
+
- `documentation`
80
+
- `codeowner`
142
81
143
-
### Configuration options for `switch` list
82
+
**Example usage of the `custom_components` variable:**
144
83
145
-
Key | Type | Required | Default | Description
146
-
-- | -- | -- | -- | --
147
-
`enabled`| `boolean` | `False` | `True` | Boolean to enable/disable the platform.
148
-
`name`| `string` | `False` | `blueprint` | Custom name for the entity.
84
+
```
85
+
{%- set custom_component_descriptions = {"readme": "Generates this awesome readme file."} -%}
0 commit comments