forked from custom-components/wienerlinien
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes custom-components#18
- Loading branch information
Showing
22 changed files
with
546 additions
and
396 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 |
---|---|---|
@@ -1,17 +1,19 @@ | ||
default_config: | ||
logger: | ||
default: error | ||
logs: | ||
custom_components.wienerlinien: debug | ||
|
||
|
||
|
||
sensor: | ||
- platform: wienerlinien | ||
apikey: 2190400 | ||
stops: '4429' | ||
firstnext: first | ||
- platform: wienerlinien | ||
apikey: 2190400 | ||
stops: '4429' | ||
firstnext: next | ||
default_config: | ||
logger: | ||
default: error | ||
logs: | ||
custom_components.wienerlinien: debug | ||
|
||
|
||
sensor: | ||
- platform: wienerlinien | ||
stops: '4429' | ||
firstnext: first | ||
- platform: wienerlinien | ||
stops: '4429' | ||
firstnext: next | ||
- platform: wienerlinien | ||
firstnext: first | ||
stops: | ||
- '4429' | ||
- '3230' |
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 |
---|---|---|
@@ -1,32 +1,28 @@ | ||
// See https://aka.ms/vscode-remote/devcontainer.json for format details. | ||
{ | ||
"name": "wienerlinien dev", | ||
"image": "ludeeus/devcontainer:integration", | ||
"context": "..", | ||
"appPort": [ | ||
"9123:8123" | ||
], | ||
"postCreateCommand": "dc install", | ||
"runArgs": [ | ||
"-v", | ||
"${env:HOME}${env:USERPROFILE}/.ssh:/tmp/.ssh" // This is added so you can push from inside the container | ||
], | ||
"extensions": [ | ||
"ms-python.python", | ||
"github.vscode-pull-request-github", | ||
"tabnine.tabnine-vscode" | ||
], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
"python.pythonPath": "/usr/bin/python3", | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.formatting.provider": "black", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true | ||
} | ||
} | ||
{ | ||
"name": "wienerlinien development", | ||
"image": "ludeeus/container:integration", | ||
"context": "..", | ||
"postCreateCommand": "make init", | ||
"appPort": [ | ||
"9123:8123" | ||
], | ||
"extensions": [ | ||
"ms-python.python", | ||
"github.vscode-pull-request-github", | ||
"ryanluker.vscode-coverage-gutters", | ||
"ms-python.vscode-pylance" | ||
], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
"python.pythonPath": "/usr/bin/python3", | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.formatting.provider": "black", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true | ||
} | ||
} |
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,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Make the config dir | ||
mkdir -p /tmp/config | ||
|
||
|
||
# Symplink the custom_components dir | ||
if [ -d "/tmp/config/custom_components" ]; then | ||
rm -rf /tmp/config/custom_components | ||
fi | ||
ln -sf "${PWD}/custom_components" /tmp/config/custom_components | ||
|
||
# Symlink configuration.yaml | ||
if [ ! -f ".devcontainer/configuration.yaml" ]; then | ||
cp .devcontainer/sample_configuration.yaml .devcontainer/configuration.yaml | ||
fi | ||
ln -sf "${PWD}/.devcontainer/configuration.yaml" /tmp/config/configuration.yaml | ||
|
||
|
||
# Start Home Assistant | ||
hass -c /tmp/config |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
--- | ||
name: Issue | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
**Version of the custom_component** | ||
<!-- If you are not using the newest version, download and try that before opening a issue--> | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**log** | ||
<!-- issues without debug logging will be closed--> | ||
``` | ||
Add your logs here. | ||
``` | ||
--- | ||
name: Issue | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
**Version of the custom_component** | ||
<!-- If you are not using the newest version, download and try that before opening a issue--> | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**log** | ||
<!-- issues without debug logging will be closed--> | ||
``` | ||
Add your logs 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,41 @@ | ||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.6.2 | ||
hooks: | ||
- id: pyupgrade | ||
stages: [manual] | ||
args: | ||
- "--py37-plus" | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
stages: [manual] | ||
args: | ||
- --safe | ||
- --quiet | ||
files: ^((custom_components|script|tests)/.+)?[^/]+\.py$ | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v1.17.1 | ||
hooks: | ||
- id: codespell | ||
stages: [manual] | ||
args: | ||
- --quiet-level=2 | ||
- --ignore-words-list=hass,ba,fo,mabe | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.1.0 | ||
hooks: | ||
- id: check-json | ||
stages: [manual] | ||
- id: requirements-txt-fixer | ||
stages: [manual] | ||
- id: check-ast | ||
stages: [manual] | ||
- id: mixed-line-ending | ||
stages: [manual] | ||
args: | ||
- --fix=lf |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 14 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
#exemptLabels: | ||
# - pinned | ||
# - security | ||
# Label to use when marking an issue as stale | ||
staleLabel: Stale | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 14 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
#exemptLabels: | ||
# - pinned | ||
# - security | ||
# Label to use when marking an issue as stale | ||
staleLabel: Stale | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: 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,53 @@ | ||
name: Home Assistant | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
ha_test: | ||
name: Home Assistant Check | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Get the repository content" | ||
uses: actions/checkout@v2 | ||
|
||
- name: Enable version ${{ matrix.python-version }} of Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y python-dev pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev | ||
make init | ||
- name: Install dependencies for custom_components | ||
run: | | ||
for file in $(find custom_components/ -name "manifest.json"); do | ||
cat "$file" | for req in $(jq .requirements[]); | ||
do pip install $(echo "$req" | jq -r .); | ||
done; | ||
done | ||
- name: 'Copy sample configuration for Home Assistant' | ||
run: cp -f .devcontainer/sample_configuration.yaml ./configuration.yaml | ||
|
||
- name: Home Assistant configuration check | ||
run: | | ||
echo "Testing with this configuration:" | ||
cat configuration.yaml | ||
echo "" | ||
hass --script check_config --config . |
Oops, something went wrong.