Skip to content

Commit c6d898c

Browse files
authored
Merge pull request #25 from dala318/make-repository-hacs-compliant
Make repository HACS compliant
2 parents ac60708 + 5255a59 commit c6d898c

File tree

15 files changed

+96
-13
lines changed

15 files changed

+96
-13
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
# These are supported funding model platforms
3+
4+
patreon: Dala318

.github/workflows/hacs.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: HACS Action
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
hacs:
9+
name: HACS Action
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
- name: HACS Action
13+
uses: "hacs/action@main"
14+
with:
15+
category: "integration"

.github/workflows/hassfest.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Validate with hassfest
2+
3+
on:
4+
push:
5+
pull_request:
6+
# schedule:
7+
# - cron: "0 0 * * *"
8+
9+
jobs:
10+
validate:
11+
runs-on: "ubuntu-latest"
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: home-assistant/actions/hassfest@master

.github/workflows/release.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Release"
2+
3+
on:
4+
release:
5+
types:
6+
- "published"
7+
8+
permissions: {}
9+
10+
jobs:
11+
release:
12+
name: "Release"
13+
runs-on: "ubuntu-latest"
14+
permissions:
15+
contents: write
16+
steps:
17+
- name: "Checkout the repository"
18+
uses: "actions/checkout@v4"
19+
20+
- name: "Adjust version number"
21+
shell: "bash"
22+
run: |
23+
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
24+
"${{ github.workspace }}/custom_components/ph803w/manifest.json"
25+
26+
- name: "ZIP the integration directory"
27+
shell: "bash"
28+
run: |
29+
cd "${{ github.workspace }}/custom_components/ph803w"
30+
zip ph803w.zip -r ./
31+
32+
- name: "Upload the ZIP file to the release"
33+
uses: softprops/action-gh-release@v2.0.8
34+
with:
35+
files: ${{ github.workspace }}/custom_components/ph803w/ph803w.zip

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,25 @@ With a lot of inspiration and help from https://github.com/Apollon77/node-ph803w
44
Still a lot left to do but at least it can poll the device and show values in Home Assistant.
55
In desktop mode (running cyclic with lib/main.py) it performs a bit better.
66

7-
## Installation of HA component
7+
# Installation
88

9-
1. Clone this repo as `ph803w` dir into `$HA_CONFIG_DIR/custom_components/`
10-
```
11-
$ cd custom_components
12-
$ git clone git@github.com:dala318/ph803w.git ./ph803w
13-
```
14-
2. Setup `$HA_CONFIG_DIR/configuration.yaml`
9+
## Option 1: HACS
10+
1. Go to HACS -> Integrations
11+
2. Click the three dots on the top right and select `Custom Repositories`
12+
3. Enter `https://github.com/dala318/python_ph803w` as repository, select the category `Integration` and click Add
13+
4. A new custom integration shows up for installation (PH-803W) - install it
14+
5. Restart Home Assistant
15+
16+
## Option 2: Manual
17+
18+
1. Copy the `ph803w` folder to HA `<config_dir>/custom_components/ph803w/`
19+
2. Restart Home Assistant
20+
21+
# Configuration
22+
23+
Setup `$HA_CONFIG_DIR/configuration.yaml`
1524

1625
```yaml
1726
ph803w:
1827
host: 192.168.1.2 # IP of your device
1928
```
20-
## Changelog

0 commit comments

Comments
 (0)