-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bd0d6d2
Showing
37 changed files
with
2,382 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "ludeeus/integration_blueprint", | ||
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.11-bullseye", | ||
"postCreateCommand": "scripts/setup", | ||
"appPort": [ | ||
"9129:8123" | ||
], | ||
"portsAttributes": { | ||
"8123": { | ||
"label": "Home Assistant - Webasto Connect", | ||
"onAutoForward": "notify" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"github.vscode-pull-request-github", | ||
"ryanluker.vscode-coverage-gutters", | ||
"ms-python.vscode-pylance", | ||
"ms-python.black-formatter" | ||
], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"python.pythonPath": "/usr/bin/python3", | ||
"python.analysis.autoSearchPaths": false, | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.formatting.provider": "black", | ||
"python.formatting.blackPath": "/usr/local/py-utils/bin/black", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true | ||
} | ||
} | ||
}, | ||
"remoteUser": "root", | ||
"features": { | ||
"ghcr.io/devcontainers/features/rust:1": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Feature request | ||
description: Make a request for a new feature in the Webasto Connect (ThermoConnect) integration | ||
title: "[FR]: " | ||
labels: ["feature request"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
This form is only for requesting new features to the integration. | ||
Remember to add a descriptive title after the predefined text. | ||
- type: textarea | ||
validations: | ||
required: true | ||
attributes: | ||
label: Describe the feature you wish to make a request for | ||
description: >- | ||
Provide a clear and concise description of what you wish for. | ||
The more precise and detailed the more likely it is to be accepted and made. | ||
- type: textarea | ||
attributes: | ||
label: Describe alternatives you've considered | ||
description: >- | ||
Have you considered any alternatives (ie. other existing integrations that can handle this) | ||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: >- | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Report a bug / issue | ||
description: Report an issue with the Webasto Connect (ThermoConnect) integration | ||
labels: ["bug"] | ||
assignees: | ||
- MTrab | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
This issue form is for reporting bugs only! | ||
- type: textarea | ||
validations: | ||
required: true | ||
attributes: | ||
label: Describe the issue | ||
description: >- | ||
Describe the issue you are experiencing here. | ||
Describe what you were trying to do and what happened. | ||
Provide a clear and concise description of what the problem is. | ||
- type: markdown | ||
attributes: | ||
value: | | ||
## Environment | ||
- type: input | ||
id: version | ||
validations: | ||
required: true | ||
attributes: | ||
label: What version of Home Assistant Core has the issue? | ||
placeholder: core- | ||
description: > | ||
Can be found in: [Settings ⇒ System ⇒ Repairs ⇒ Three Dots in Upper Right ⇒ System information](https://my.home-assistant.io/redirect/system_health/). | ||
[![Open your Home Assistant instance and show the system information.](https://my.home-assistant.io/badges/system_health.svg)](https://my.home-assistant.io/redirect/system_health/) | ||
- type: input | ||
attributes: | ||
label: What was the last working version of Home Assistant Core? | ||
placeholder: core- | ||
description: > | ||
If known, otherwise leave blank. | ||
- type: dropdown | ||
validations: | ||
required: true | ||
attributes: | ||
label: What type of installation are you running? | ||
description: > | ||
Can be found in: [Settings ⇒ System ⇒ Repairs ⇒ Three Dots in Upper Right ⇒ System information](https://my.home-assistant.io/redirect/system_health/). | ||
[![Open your Home Assistant instance and show the system information.](https://my.home-assistant.io/badges/system_health.svg)](https://my.home-assistant.io/redirect/system_health/) | ||
options: | ||
- Home Assistant OS | ||
- Home Assistant Container | ||
- Home Assistant Supervised | ||
- Home Assistant Core | ||
- type: markdown | ||
attributes: | ||
value: | | ||
# Details | ||
- type: textarea | ||
validations: | ||
required: true | ||
attributes: | ||
label: Diagnostics information | ||
placeholder: "drag-and-drop the diagnostics data file here (do not copy-and-paste the content)" | ||
description: >- | ||
This integrations provide the ability to [download diagnostic data](https://www.home-assistant.io/docs/configuration/troubleshooting/#debug-logs-and-diagnostics). | ||
**It would really help if you could download the diagnostics data for the device you are having issues with, | ||
and <ins>drag-and-drop that file into the textbox below.</ins>** | ||
It generally allows pinpointing defects and thus resolving issues faster. | ||
If you are unable to provide the diagnostics (ie. you cannot add the integration), please write **None** in this field. | ||
- type: textarea | ||
attributes: | ||
label: Anything in the logs that might be useful for us? | ||
description: For example, error message, or stack traces. | ||
render: txt | ||
- type: textarea | ||
attributes: | ||
label: Additional information | ||
description: > | ||
If you have any additional information for us, use the field below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
labels: | ||
- dependencies | ||
- patch | ||
- skip-changelog | ||
- package-ecosystem: pip | ||
directory: "/.github/workflows" | ||
schedule: | ||
interval: daily | ||
labels: | ||
- dependencies | ||
- patch | ||
- skip-changelog | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "04:00" | ||
labels: | ||
- dependencies | ||
- patch | ||
ignore: | ||
- dependency-name: "homeassistant" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
change-template: '- #$NUMBER $TITLE @$AUTHOR' | ||
sort-direction: ascending | ||
exclude-labels: | ||
- 'skip-changelog' | ||
categories: | ||
- title: '⚒️ Breaking Changes' | ||
labels: | ||
- breaking-change | ||
|
||
- title: '🚀 Features' | ||
labels: | ||
- 'feature request' | ||
- 'enhancement' | ||
|
||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
|
||
- title: '🧬 Changes to Charge Owner informations' | ||
labels: | ||
- chargeowner | ||
- chargeowners | ||
|
||
- title: '🧬 New Charge Owner(s) added' | ||
labels: | ||
- 'new chargeowner' | ||
|
||
- title: '🧰 Maintenance' | ||
label: 'chore' | ||
|
||
- title: '📦 Dependencies' | ||
labels: | ||
- 'dependencies' | ||
|
||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
default: patch | ||
template: | | ||
## Changes | ||
$CHANGES | ||
autolabeler: | ||
- label: 'bug' | ||
branch: | ||
- '/fix\/.+/' | ||
- label: 'feature request' | ||
branch: | ||
- '/feature\/.+/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
"""Update the manifest file.""" | ||
import json | ||
import os | ||
import sys | ||
|
||
|
||
def update_manifest(): | ||
"""Update the manifest file.""" | ||
version = "0.0.0" | ||
manifest_path = False | ||
dorequirements = False | ||
|
||
for index, value in enumerate(sys.argv): | ||
if value in ["--version", "-V"]: | ||
version = str(sys.argv[index + 1]).replace("v", "") | ||
if value in ["--path", "-P"]: | ||
manifest_path = str(sys.argv[index + 1])[1:-1] | ||
if value in ["--requirements", "-R"]: | ||
dorequirements = True | ||
|
||
if not manifest_path: | ||
sys.exit("Missing path to manifest file") | ||
|
||
with open( | ||
f"{os.getcwd()}/{manifest_path}/manifest.json", | ||
encoding="UTF-8", | ||
) as manifestfile: | ||
manifest = json.load(manifestfile) | ||
|
||
manifest["version"] = version | ||
|
||
if dorequirements: | ||
requirements = [] | ||
with open( | ||
f"{os.getcwd()}/requirements.txt", | ||
encoding="UTF-8", | ||
) as file: | ||
for line in file: | ||
requirements.append(line.rstrip()) | ||
|
||
new_requirements = [] | ||
for requirement in requirements: | ||
req = requirement.split("==")[0].lower() | ||
new_requirements = [ | ||
requirement | ||
for x in manifest["requirements"] | ||
if x.lower().startswith(req) | ||
] | ||
new_requirements += [ | ||
x for x in manifest["requirements"] if not x.lower().startswith(req) | ||
] | ||
manifest["requirements"] = new_requirements | ||
|
||
with open( | ||
f"{os.getcwd()}/{manifest_path}/manifest.json", | ||
"w", | ||
encoding="UTF-8", | ||
) as manifestfile: | ||
manifestfile.write( | ||
json.dumps( | ||
{ | ||
"domain": manifest["domain"], | ||
"name": manifest["name"], | ||
**{ | ||
k: v | ||
for k, v in sorted(manifest.items()) | ||
if k not in ("domain", "name") | ||
}, | ||
}, | ||
indent=4, | ||
) | ||
) | ||
|
||
|
||
update_manifest() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Format code | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
format: | ||
name: Format with black and isort | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python 3.8 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.8 | ||
- name: Cache | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-format | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
python -m pip install --upgrade black isort | ||
- name: Pull again | ||
run: git pull || true | ||
- name: Run formatting | ||
run: | | ||
python -m isort -v --multi-line 3 --trailing-comma -l 88 --recursive . | ||
python -m black -v . | ||
- name: Commit files | ||
run: | | ||
if [ $(git diff HEAD | wc -l) -gt 30 ] | ||
then | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config user.name "GitHub Actions" | ||
git commit -m "Run formatting" -a || true | ||
git push || true | ||
fi |
Oops, something went wrong.