Skip to content

Commit 10af01c

Browse files
authored
Merge pull request #4 from MelleD/improve
Add different improvements
2 parents c198fd8 + 1e1fcf0 commit 10af01c

File tree

13 files changed

+224
-70
lines changed

13 files changed

+224
-70
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
github: [MelleD]
2+
buy_me_a_coffee: melled
3+
custom: ["https://www.paypal.me/MelleDennis"]
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
READ THIS FIRST:
10+
Thanks for raising a expander card issue. Please take the time to review the following
11+
categories as some of them do not apply here.
12+
13+
🙅 "Please DO NOT Raise an Issue" Cases
14+
- Question
15+
STOP!! Please ask questions about how to use something, or to understand why something isn't
16+
working as you expect it to Github discussion or on forum https://community.home-assistant.io/t/expander-accordion-collapsible-card/738817/4.
17+
- Managed Dependency Upgrade
18+
You DO NOT need to raise an issue for a managed dependency version upgrade as there's a semi-automatic process for checking managed dependencies for new versions before a release. BUT pull requests for upgrades that are more involved than just a version property change are still most welcome.
19+
- With an Immediate Pull Request
20+
An issue will be closed as a duplicate of the immediate pull request, so you don't have to raise an issue if you plan to create a pull request immediately.
21+
22+
🐞 Bug report (please don't include this emoji/text, just add your details)
23+
Please provide details of the problem, including the version of expander card and your Brwoser that you
24+
are using. If possible, please provide a test case or sample application that reproduces
25+
the problem. This makes it much easier for us to diagnose the problem and to verify that
26+
we have fixed it
27+
For quick troubleshooting, prepare a [minimally reproducible example](https://en.wikipedia.org/wiki/Minimal_reproducible_example).
28+
29+
!!!Please check your Browser console for Javascript errors!!!
30+
31+
32+
33+
TIP: You can always edit your issue if it isn't formatted correctly.
34+
See https://guides.github.com/features/mastering-markdown
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: feature request
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
Please start by describing the problem that you are trying to solve. There may already
11+
be a solution, or there may be a way to solve it that you hadn't considered.
12+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
13+
14+
**Describe the solution you'd like**
15+
A clear and concise description of what you want to happen.
16+
17+
**Describe alternatives you've considered**
18+
A clear and concise description of any alternative solutions or features you've considered.
19+
20+
**Additional context**
21+
Add any other context or screenshots about the feature request here.
22+
23+
24+
TIP: You can always edit your issue if it isn't formatted correctly.
25+
See https://guides.github.com/features/mastering-markdown

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
# Enable version updates for pip
9+
- package-ecosystem: "pip"
10+
# Look for `requirements.txt` and `lock` files in the `root` directory
11+
directory: "/"
12+
# Check the registry for updates every day (weekdays)
13+
schedule:
14+
interval: "daily"
15+
16+
# Enable version updates for github-actions
17+
- package-ecosystem: "github-actions"
18+
directory: "/"
19+
schedule:
20+
interval: "daily"

.github/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
changelog:
2+
categories:
3+
- title: 🛠 Dependency Upgrades
4+
labels:
5+
- dependencies
6+
- title: 🐛 Bug fixes
7+
labels:
8+
- bug
9+
- title: ⭐ New Features
10+
labels:
11+
- "*"

.github/workflows/autoClose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Close inactive issues
2+
on:
3+
schedule:
4+
- cron: "30 1 * * *"
5+
workflow_dispatch:
6+
7+
jobs:
8+
close-issues:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
pull-requests: write
13+
steps:
14+
- uses: actions/stale@v9
15+
with:
16+
days-before-issue-stale: 30
17+
days-before-issue-close: 14
18+
stale-issue-label: "stale"
19+
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
20+
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
21+
days-before-pr-stale: -1
22+
days-before-pr-close: -1
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
only-labels: "wait-for-user-input,wait-for-mre"

.github/workflows/python_check.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,6 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
include:
17-
- home-assistant: "2023.3.0"
18-
python-version: "3.10"
19-
- home-assistant: "2023.4.0"
20-
python-version: "3.10"
21-
- home-assistant: "2023.5.0"
22-
python-version: "3.10"
23-
- home-assistant: "2023.6.0"
24-
python-version: "3.10"
25-
- home-assistant: "2023.7.0"
26-
python-version: "3.10"
27-
- home-assistant: "2023.7.0"
28-
python-version: "3.11"
29-
- home-assistant: "2023.8.0"
30-
python-version: "3.11"
31-
- home-assistant: "2023.9.0"
32-
python-version: "3.11"
33-
- home-assistant: "2023.10.0"
34-
python-version: "3.11"
35-
- home-assistant: "2023.11.0"
36-
python-version: "3.11"
37-
- home-assistant: "2023.12.0"
38-
python-version: "3.11"
39-
- home-assistant: "2024.1.0"
40-
python-version: "3.11"
4117
- home-assistant: "2024.2.0"
4218
python-version: "3.11"
4319
- home-assistant: "2024.2.0"
@@ -60,13 +36,6 @@ jobs:
6036
# stop the build if there are Python syntax errors or undefined names
6137
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
6238
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
63-
# - name: Type check with mypy
64-
# run: |
65-
# touch "$(python -c 'import inspect, homeassistant, os; print(os.path.dirname(inspect.getfile(homeassistant)))')"/py.typed
66-
# mypy -p custom_components.speedport
67-
# - name: Analysing the code with pylint
68-
# run: |
69-
# pylint --max-line-length 88 $(git ls-files '*.py')
7039
- name: Check black style
7140
run: |
7241
black . --check

.github/workflows/release.yml

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,58 @@
1-
name: Release
1+
name: "Create Tagged Release"
22

33
on:
4-
release:
5-
types: [published]
4+
workflow_dispatch:
5+
inputs:
6+
release_version:
7+
description: 'Version number of the release'
8+
required: true
69

710
jobs:
8-
release-zip:
11+
gh_tagged_release:
12+
name: Create tagged release
913
runs-on: ubuntu-latest
14+
1015
steps:
11-
- uses: actions/checkout@v2
16+
- name: Checkout project
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Git
20+
run: |
21+
git config user.name github-actions
22+
git config user.email [email protected]
23+
- name: Update version in manifest.json
24+
run: |
25+
cd ${{ github.workspace }}/custom_components/speedport
26+
release_version="${{ github.event.inputs.release_version }}"
27+
echo "Debug: release_version is $release_version"
28+
jq --arg version "$release_version" '.version = $version' manifest.json > temp.json
29+
mv temp.json manifest.json
1230
13-
- name: ZIP Component Dir
31+
- name: Build
1432
run: |
1533
cd ${{ github.workspace }}/custom_components/speedport
16-
zip -r speedport.zip ./
34+
zip speedport.zip -r ./
1735
18-
- name: Upload zip to release
19-
uses: svenstaro/upload-release-action@v2
36+
- name: "Create Github release (full)"
37+
if: ${{ !contains( github.event.inputs.release_version, '-rc' ) }}
38+
uses: softprops/action-gh-release@v2
39+
id: speedport_release
2040
with:
21-
repo_token: ${{ secrets.GITHUB_TOKEN }}
22-
file: ${{ github.workspace }}/custom_components/speedport/speedport.zip
23-
asset_name: speedport.zip
24-
tag: ${{ github.ref }}
25-
overwrite: true
41+
body: "Release version ${{ github.event.inputs.release_version }}."
42+
tag_name: ${{ github.event.inputs.release_version }}
43+
target_commitish: "main"
44+
draft: false
45+
prerelease: false
46+
files: ${{ github.workspace }}/custom_components/speedport/speedport.zip
47+
generate_release_notes: true
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: "Notify issues of release their fix is contained in"
52+
uses: apexskier/github-release-commenter@3bd413ad5e1d603bfe2282f9f06f2bdcec079327 # v1.3.6
53+
with:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
comment-template: |
56+
Release {release_link} addresses this.
57+
58+

README.md

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Speedport Integration for Home Assistant
22

3-
[![hacs_badge](https://img.shields.io/badge/hacs-Default-41BDF5.svg)](https://hacs.xyz)
4-
[![GitHub](https://img.shields.io/github/license/Andre0512/speedport?color=red)](https://github.com/Andre0512/speedport/blob/main/LICENSE)
5-
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Andre0512/speedport/python_check.yml?branch=main&label=checks)](https://github.com/Andre0512/speedport/actions/workflows/python_check.yml)
6-
[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-donate-orange.svg)](https://www.buymeacoffee.com/andre0512)
7-
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/Andre0512/speedport?color=green)](https://github.com/Andre0512/speedport/releases/latest)
8-
[![GitHub all releases](https://img.shields.io/github/downloads/Andre0512/speedport/latest/total?color=blue&label=downloads)](https://tooomm.github.io/github-release-stats/?username=Andre0512&repository=speedport)
9-
[![GitHub all releases](https://img.shields.io/github/downloads/Andre0512/speedport/total?color=blue&label=total%20downloads)](https://tooomm.github.io/github-release-stats/?username=Andre0512&repository=speedport)
3+
[![release][release-badge]][release-url]
4+
![downloads][downloads-badge]
5+
[![PayPal.Me][paypal-me-badge]][paypal-me-url]
6+
[![BuyMeCoffee][buy-me-a-coffee-shield]][buy-me-a-coffee-url]
107

118
Telekom Speedport Integration for Home Assistant based
129
on [speedport-api](https://github.com/Andre0512/speedport-api.git).
1310

11+
## Introduction
12+
13+
First a few words to start with. A big thank you goes to @Andre0512 (https://github.com/Andre0512/speedport), who initially launched the card, but he does not have enough time for further care. I forked this card for my own HomeAssistant to make a few improvements. I give no guarantee for the functionality and no promise of lifelong maintenance, as I do the whole thing in my free time. Of course, I am happy about every contribution and PR
14+
15+
1416
## Features
1517

1618
- Track presence of connected devices
@@ -24,11 +26,20 @@ on [speedport-api](https://github.com/Andre0512/speedport-api.git).
2426
* Speedport Smart 4
2527

2628
## Installation
27-
**Method 1:** [![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=Andre0512&repository=speedport&category=integration)
2829

29-
**Method 2:** [HACS](https://hacs.xyz/) > Integrations > Add Integration > **Speedport** > Install
30+
### HACS
31+
32+
The Speedport is not available in [HACS][hacs] (Home Assistant Community Store) by default, but you can add it as custom repositories.
3033

31-
**Method 3:** Manually copy `speedport` folder from [latest release](https://github.com/Andre0512/speedport/releases/latest) to `config/custom_components` folder.
34+
1. Install HACS if you don't have it already
35+
2. Open HACS in Home Assistant
36+
3. Add this repository (https://github.com/MelleD/speedport) via HACS Custom repositories ([How to add Custom Repositories](https://hacs.xyz/docs/faq/custom_repositories/))
37+
38+
[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=MelleD&repository=speedport&category=plugin)
39+
40+
### Manuall (not recommended)
41+
42+
Manually copy `speedport` folder from [latest release](https://github.com/MelleD/speedport/releases/latest) to `config/custom_components` folder.
3243

3344
_Restart Home Assistant_
3445

@@ -41,13 +52,36 @@ _If the integration is not in the list, you need to clear the browser cache._
4152

4253
### Further Information
4354

44-
If you have email notifications enabled, make sure you have the "A security related event has occurred" option unchecked
45-
or you will receive a lot of emails, see [#1](https://github.com/Andre0512/speedport/issues/1).
55+
If you have email notifications enabled, make sure you have the "A security related event has occurred" option unchecked or you will receive a lot of emails.
4656

4757
## Support
4858

49-
If you find this project helpful and would like to support its development, you can buy me a coffee! ☕
59+
Clone and create a PR to help make the card even better.
60+
61+
Please ⭐️ or sponsor this repo when you like it.
62+
63+
## Sponsor ❤️
64+
65+
<a href="" target="_blank"><img src="https://img.shields.io/static/v1.svg?label=%20&message=PayPal.Me&logo=paypal" alt="PayPal.Me MelleDennis" style="height: auto !important;width: auto !important;" ></a>
66+
67+
<a href="https://www.buymeacoffee.com/melled" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/white_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
68+
69+
70+
71+
<!-- Badges -->
72+
73+
[hacs-badge]: https://img.shields.io/badge/hacs-default-orange.svg?style=flat-square
74+
[release-badge]: https://img.shields.io/github/v/release/MelleD/speedport?style=flat-square
75+
[downloads-badge]: https://img.shields.io/github/downloads/MelleD/speedport/total?style=flat-square
76+
[build-badge]: https://img.shields.io/github/actions/workflow/status/MelleD/speedport/build.yml?branch=main&style=flat-square
77+
[paypal-me-badge]: https://img.shields.io/static/v1.svg?label=%20&message=PayPal.Me&logo=paypal
78+
[buy-me-a-coffee-shield]: https://img.shields.io/static/v1.svg?label=%20&message=Buy%20me%20a%20coffee&color=6f4e37&logo=buy%20me%20a%20coffee&logoColor=white
5079

51-
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/andre0512)
80+
<!-- References -->
5281

53-
Don't forget to star the repository if you found it useful! ⭐
82+
[hacs-url]: https://github.com/hacs/integration
83+
[home-assistant]: https://www.home-assistant.io/
84+
[hacs]: https://hacs.xyz
85+
[release-url]: https://github.com/MelleD/speedport/releases
86+
[paypal-me-url]: https://www.paypal.me/MelleDennis
87+
[buy-me-a-coffee-url]: https://www.buymeacoffee.com/melled

custom_components/speedport/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,3 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
5555
await speedport.close()
5656

5757
return unload_ok
58-

0 commit comments

Comments
 (0)