Skip to content

Commit 2820877

Browse files
committed
Initial Commit
1 parent cf4f85b commit 2820877

22 files changed

+1202
-14
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: [https://www.buymeacoffee.com/monty68]
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/issue.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Issue
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
<!-- Before you open a new issue, search through the existing issues to see if others have had the same problem.
8+
9+
Issues not containing the minimum requirements will be closed:
10+
11+
- Issues without a description (using the header is not good enough) will be closed.
12+
- Issues without debug logging will be closed.
13+
- Issues without configuration will be closed
14+
15+
-->
16+
17+
## Version of the custom_component
18+
<!-- If you are not using the newest version, download and try that before opening an issue
19+
If you are unsure about the version check the const.py file.
20+
-->
21+
22+
## Configuration
23+
24+
```yaml
25+
26+
Add your logs here.
27+
28+
```
29+
30+
## Describe the bug
31+
A clear and concise description of what the bug is.
32+
33+
34+
## Debug log
35+
36+
<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->
37+
38+
```text
39+
40+
Add your logs here.
41+
42+
```

.github/workflows/cron.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Cron actions
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
jobs:
8+
validate:
9+
runs-on: "ubuntu-latest"
10+
name: Validate
11+
steps:
12+
- uses: "actions/checkout@v2"
13+
14+
- name: HACS validation
15+
uses: "hacs/action@main"
16+
with:
17+
category: "integration"
18+
ignore: brands
19+
20+
- name: Hassfest validation
21+
uses: "home-assistant/actions/hassfest@master"

.github/workflows/pull.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Pull actions
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
validate:
8+
runs-on: "ubuntu-latest"
9+
name: Validate
10+
steps:
11+
- uses: "actions/checkout@v2"
12+
13+
- name: HACS validation
14+
uses: "hacs/action@main"
15+
with:
16+
category: "integration"
17+
ignore: brands
18+
19+
- name: Hassfest validation
20+
uses: "home-assistant/actions/hassfest@master"
21+
22+
style:
23+
runs-on: "ubuntu-latest"
24+
name: Check style formatting
25+
steps:
26+
- uses: "actions/checkout@v2"
27+
- uses: "actions/setup-python@v1"
28+
with:
29+
python-version: "3.x"
30+
- run: python3 -m pip install black
31+
- run: black .
32+
33+
tests:
34+
runs-on: "ubuntu-latest"
35+
name: Run tests
36+
steps:
37+
- name: Check out code from GitHub
38+
uses: "actions/checkout@v2"
39+
- name: Setup Python
40+
uses: "actions/setup-python@v1"
41+
with:
42+
python-version: "3.8"
43+
- name: Install requirements
44+
run: python3 -m pip install -r requirements_test.txt
45+
- name: Run tests
46+
run: |
47+
pytest \
48+
-qq \
49+
--timeout=9 \
50+
--durations=10 \
51+
-n auto \
52+
--cov custom_components.integration_blueprint \
53+
-o console_output_style=count \
54+
-p no:sugar \
55+
tests

.github/workflows/push.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Push actions
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
9+
jobs:
10+
validate:
11+
runs-on: "ubuntu-latest"
12+
name: Validate
13+
steps:
14+
- uses: "actions/checkout@v2"
15+
16+
- name: HACS validation
17+
uses: "hacs/action@main"
18+
with:
19+
category: "integration"
20+
ignore: brands
21+
22+
- name: Hassfest validation
23+
uses: "home-assistant/actions/hassfest@master"
24+
25+
style:
26+
runs-on: "ubuntu-latest"
27+
name: Check style formatting
28+
steps:
29+
- uses: "actions/checkout@v2"
30+
- uses: "actions/setup-python@v1"
31+
with:
32+
python-version: "3.x"
33+
- run: python3 -m pip install black
34+
- run: black .
35+
36+
tests:
37+
runs-on: "ubuntu-latest"
38+
name: Run tests
39+
steps:
40+
- name: Check out code from GitHub
41+
uses: "actions/checkout@v2"
42+
- name: Setup Python
43+
uses: "actions/setup-python@v1"
44+
with:
45+
python-version: "3.8"
46+
- name: Install requirements
47+
run: python3 -m pip install -r requirements_test.txt
48+
- name: Run tests
49+
run: |
50+
pytest \
51+
-qq \
52+
--timeout=9 \
53+
--durations=10 \
54+
-n auto \
55+
--cov custom_components.integration_blueprint \
56+
-o console_output_style=count \
57+
-p no:sugar \
58+
tests

.gitignore

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
.to.do

CONTRIBUTING.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contribution guidelines
2+
3+
Contributing to this project should be as easy and transparent as possible, whether it's:
4+
5+
- Reporting a bug
6+
- Discussing the current state of the code
7+
- Submitting a fix
8+
- Proposing new features
9+
10+
## Github is used for everything
11+
12+
Github is used to host code, to track issues and feature requests, as well as accept pull requests.
13+
14+
Pull requests are the best way to propose changes to the codebase.
15+
16+
1. Fork the repo and create your branch from `master`.
17+
2. If you've changed something, update the documentation.
18+
3. Make sure your code lints (using black).
19+
4. Test you contribution.
20+
5. Issue that pull request!
21+
22+
## Any contributions you make will be under the MIT Software License
23+
24+
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
25+
26+
## Report bugs using Github's [issues](../../issues)
27+
28+
GitHub issues are used to track public bugs.
29+
Report a bug by [opening a new issue](../../issues/new/choose); it's that easy!
30+
31+
## Write bug reports with detail, background, and sample code
32+
33+
**Great Bug Reports** tend to have:
34+
35+
- A quick summary and/or background
36+
- Steps to reproduce
37+
- Be specific!
38+
- Give sample code if you can.
39+
- What you expected would happen
40+
- What actually happens
41+
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
42+
43+
People *love* thorough bug reports. I'm not even kidding.
44+
45+
## Use a Consistent Coding Style
46+
47+
Use [black](https://github.com/ambv/black) to make sure the code follows the style.
48+
49+
## Test your code modification
50+
51+
This custom component is based on [integration_blueprint template](https://github.com/custom-components/integration_blueprint).
52+
53+
## License
54+
55+
By contributing, you agree that your contributions will be licensed under its MIT License.

0 commit comments

Comments
 (0)