Skip to content

Commit 32d52aa

Browse files
authored
Update template documentations (#3)
Used the inputs used when setting the template within README.md and info.md
1 parent d3770e3 commit 32d52aa

File tree

4 files changed

+58
-49
lines changed

4 files changed

+58
-49
lines changed

cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"domain_name": "{{ cookiecutter.friendly_name | slugify(separator='_') }}",
55
"github_user": "oncleben31",
66
"version": "0.0.0",
7-
"_copy_without_render": ["*.md", "*.yml", "*.yaml"]
7+
"_copy_without_render": ["*.yml", "*.yaml"]
88
}

{{cookiecutter.project_name}}/README.md

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ File | Purpose
2727
`.github/ISSUE_TEMPLATE/issue.md` | Template for issues
2828
`.github/settings.yml` | Probot settings to control the repository settings.
2929
`.vscode/tasks.json` | Tasks for the devcontainer.
30-
`custom_components/blueprint/.translations/*` | [Translation files.](https://developers.home-assistant.io/docs/en/next/internationalization_custom_component_localization.html#translation-strings)
31-
`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.
30+
`custom_components/{{ cookiecutter.domain_name }}/.translations/*` | [Translation files.](https://developers.home-assistant.io/docs/en/next/internationalization_custom_component_localization.html#translation-strings)
31+
`custom_components/{{ cookiecutter.domain_name }}/__init__.py` | The component file for the integration.
32+
`custom_components/{{ cookiecutter.domain_name }}/binary_sensor.py` | Binary sensor platform for the integration.
33+
`custom_components/{{ cookiecutter.domain_name }}/config_flow.py` | Config flow file, this adds the UI configuration possibilities.
34+
`custom_components/{{ cookiecutter.domain_name }}/const.py` | A file to hold shared variables/constants for the entire integration.
35+
`custom_components/{{ cookiecutter.domain_name }}/manifest.json` | A [manifest file](https://developers.home-assistant.io/docs/en/creating_integration_manifest.html) for Home Assistant.
36+
`custom_components/{{ cookiecutter.domain_name }}/sensor.py` | Sensor platform for the integration.
37+
`custom_components/{{ cookiecutter.domain_name }}/switch.py` | Switch sensor platform for the integration.
3838
`CONTRIBUTING.md` | Guidelines on how to contribute.
3939
`example.png` | Screenshot that demonstrate how it might look in the UI.
4040
`info.md` | An example on a info file (used by [hacs][hacs]).
@@ -66,21 +66,19 @@ to ensure Home Assistant update the code of the python library. (example `"requi
6666
README content if this was a published component:
6767
***
6868

69-
# blueprint
69+
# {{ cookiecutter.friendly_name }}
7070

7171
[![GitHub Release][releases-shield]][releases]
7272
[![GitHub Activity][commits-shield]][commits]
7373
[![License][license-shield]](LICENSE)
7474

7575
[![hacs][hacsbadge]][hacs]
76-
![Project Maintenance][maintenance-shield]
76+
[![Project Maintenance][maintenance-shield]][user_profile]
7777
[![BuyMeCoffee][buymecoffeebadge]][buymecoffee]
7878

7979
[![Discord][discord-shield]][discord]
8080
[![Community Forum][forum-shield]][forum]
8181

82-
_Component to integrate with [blueprint][blueprint]._
83-
8482
**This component will set up the following platforms.**
8583

8684
Platform | Description
@@ -95,25 +93,25 @@ Platform | Description
9593

9694
1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`).
9795
2. If you do not have a `custom_components` directory (folder) there, you need to create it.
98-
3. In the `custom_components` directory (folder) create a new folder called `blueprint`.
99-
4. Download _all_ the files from the `custom_components/blueprint/` directory (folder) in this repository.
96+
3. In the `custom_components` directory (folder) create a new folder called `{{ cookiecutter.domain_name }}`.
97+
4. Download _all_ the files from the `custom_components/{{ cookiecutter.domain_name }}/` directory (folder) in this repository.
10098
5. Place the files you downloaded in the new directory (folder) you created.
10199
6. Restart Home Assistant
102-
7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Blueprint"
100+
7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "{{ cookiecutter.friendly_name }}"
103101

104102
Using your HA configuration directory (folder) as a starting point you should now also have this:
105103

106104
```text
107-
custom_components/blueprint/.translations/en.json
108-
custom_components/blueprint/.translations/nb.json
109-
custom_components/blueprint/.translations/sensor.nb.json
110-
custom_components/blueprint/__init__.py
111-
custom_components/blueprint/binary_sensor.py
112-
custom_components/blueprint/config_flow.py
113-
custom_components/blueprint/const.py
114-
custom_components/blueprint/manifest.json
115-
custom_components/blueprint/sensor.py
116-
custom_components/blueprint/switch.py
105+
custom_components/{{ cookiecutter.domain_name }}/.translations/en.json
106+
custom_components/{{ cookiecutter.domain_name }}/.translations/nb.json
107+
custom_components/{{ cookiecutter.domain_name }}/.translations/sensor.nb.json
108+
custom_components/{{ cookiecutter.domain_name }}/__init__.py
109+
custom_components/{{ cookiecutter.domain_name }}/binary_sensor.py
110+
custom_components/{{ cookiecutter.domain_name }}/config_flow.py
111+
custom_components/{{ cookiecutter.domain_name }}/const.py
112+
custom_components/{{ cookiecutter.domain_name }}/manifest.json
113+
custom_components/{{ cookiecutter.domain_name }}/sensor.py
114+
custom_components/{{ cookiecutter.domain_name }}/switch.py
117115
```
118116

119117
## Configuration is done in the UI
@@ -124,21 +122,28 @@ custom_components/blueprint/switch.py
124122

125123
If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md)
126124

125+
## Credits
126+
127+
This project was generated from [@oncleben31](https://github.com/oncleben31)'s [Home Assistant Custom Component Cookiecutter](https://github.com/oncleben31/cookiecutter-homeassistant-custom-component) template.
128+
129+
Code template was mainly taken from [@Ludeeus](https://github.com/ludeeus)'s [blueprint][blueprint] template
130+
127131
***
128132

129133
[blueprint]: https://github.com/custom-components/blueprint
130134
[buymecoffee]: https://www.buymeacoffee.com/ludeeus
131135
[buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge
132-
[commits-shield]: https://img.shields.io/github/commit-activity/y/custom-components/blueprint.svg?style=for-the-badge
133-
[commits]: https://github.com/custom-components/blueprint/commits/master
134-
[hacs]: https://github.com/custom-components/hacs
136+
[commits-shield]: https://img.shields.io/github/commit-activity/y/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}.svg?style=for-the-badge
137+
[commits]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/commits/main
138+
[hacs]: https://hacs.xyz
135139
[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge
136140
[discord]: https://discord.gg/Qa5fW2R
137141
[discord-shield]: https://img.shields.io/discord/330944238910963714.svg?style=for-the-badge
138142
[exampleimg]: example.png
139143
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge
140144
[forum]: https://community.home-assistant.io/
141-
[license-shield]: https://img.shields.io/github/license/custom-components/blueprint.svg?style=for-the-badge
142-
[maintenance-shield]: https://img.shields.io/badge/maintainer-Joakim%20Sørensen%20%40ludeeus-blue.svg?style=for-the-badge
143-
[releases-shield]: https://img.shields.io/github/release/custom-components/blueprint.svg?style=for-the-badge
144-
[releases]: https://github.com/custom-components/blueprint/releases
145+
[license-shield]: https://img.shields.io/github/license/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}.svg?style=for-the-badge
146+
[maintenance-shield]: https://img.shields.io/badge/maintainer-%40{{cookiecutter.github_user}}-blue.svg?style=for-the-badge
147+
[releases-shield]: https://img.shields.io/github/release/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}.svg?style=for-the-badge
148+
[releases]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/releases
149+
[user_profile]: https://github.com/{{cookiecutter.github_user}}

{{cookiecutter.project_name}}/TODO.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

{{cookiecutter.project_name}}/info.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[![GitHub Release][releases-shield]][releases]
22
[![GitHub Activity][commits-shield]][commits]
3-
[![License][license-shield]](LICENSE)
3+
[![License][license-shield]][license]
44

5-
[![hacs][hacsbadge]](hacs)
6-
![Project Maintenance][maintenance-shield]
5+
[![hacs][hacsbadge]][hacs]
6+
[![Project Maintenance][maintenance-shield]][user_profile]
77
[![BuyMeCoffee][buymecoffeebadge]][buymecoffee]
88

99
[![Discord][discord-shield]][discord]
@@ -21,34 +21,42 @@ Platform | Description
2121

2222
![example][exampleimg]
2323

24-
{% if not installed %}
24+
{{ "{% if not installed %}" }}
2525
## Installation
2626

2727
1. Click install.
2828
1. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Blueprint".
2929

30-
{% endif %}
30+
{{ "{% endif %}" }}
3131

3232

3333
## Configuration is done in the UI
3434

3535
<!---->
3636

37+
## Credits
38+
39+
This project was generated from [@oncleben31](https://github.com/oncleben31)'s [Home Assistant Custom Component Cookiecutter](https://github.com/oncleben31/cookiecutter-homeassistant-custom-component) template.
40+
41+
Code template was mainly taken from [@Ludeeus](https://github.com/ludeeus)'s [blueprint][blueprint] template
42+
3743
***
3844

3945
[blueprint]: https://github.com/custom-components/blueprint
4046
[buymecoffee]: https://www.buymeacoffee.com/ludeeus
4147
[buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge
42-
[commits-shield]: https://img.shields.io/github/commit-activity/y/custom-components/blueprint.svg?style=for-the-badge
43-
[commits]: https://github.com/custom-components/blueprint/commits/master
44-
[hacs]: https://github.com/custom-components/hacs
48+
[commits-shield]: https://img.shields.io/github/commit-activity/y/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}.svg?style=for-the-badge
49+
[commits]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/commits/main
50+
[hacs]: https://hacs.xyz
4551
[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge
4652
[discord]: https://discord.gg/Qa5fW2R
4753
[discord-shield]: https://img.shields.io/discord/330944238910963714.svg?style=for-the-badge
4854
[exampleimg]: example.png
4955
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge
5056
[forum]: https://community.home-assistant.io/
51-
[license-shield]: https://img.shields.io/github/license/custom-components/blueprint.svg?style=for-the-badge
52-
[maintenance-shield]: https://img.shields.io/badge/maintainer-Joakim%20Sørensen%20%40ludeeus-blue.svg?style=for-the-badge
53-
[releases-shield]: https://img.shields.io/github/release/custom-components/blueprint.svg?style=for-the-badge
54-
[releases]: https://github.com/custom-components/blueprint/releases
57+
[license]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/blob/main/LICENSE
58+
[license-shield]: https://img.shields.io/github/license/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}.svg?style=for-the-badge
59+
[maintenance-shield]: https://img.shields.io/badge/maintainer-%40{{cookiecutter.github_user}}-blue.svg?style=for-the-badge
60+
[releases-shield]: https://img.shields.io/github/release/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}.svg?style=for-the-badge
61+
[releases]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/releases
62+
[user_profile]: https://github.com/{{cookiecutter.github_user}}

0 commit comments

Comments
 (0)