Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# These are supported funding model platforms

patreon: Dala318
15 changes: 15 additions & 0 deletions .github/workflows/hacs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: HACS Action

on:
push:
pull_request:

jobs:
hacs:
name: HACS Action
runs-on: "ubuntu-latest"
steps:
- name: HACS Action
uses: "hacs/action@main"
with:
category: "integration"
14 changes: 14 additions & 0 deletions .github/workflows/hassfest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Validate with hassfest

on:
push:
pull_request:
# schedule:
# - cron: "0 0 * * *"

jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: home-assistant/actions/hassfest@master
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Release"

on:
release:
types:
- "published"

permissions: {}

jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
permissions:
contents: write
steps:
- name: "Checkout the repository"
uses: "actions/checkout@v4"

- name: "Adjust version number"
shell: "bash"
run: |
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
"${{ github.workspace }}/custom_components/ph803w/manifest.json"

- name: "ZIP the integration directory"
shell: "bash"
run: |
cd "${{ github.workspace }}/custom_components/ph803w"
zip ph803w.zip -r ./

- name: "Upload the ZIP file to the release"
uses: softprops/action-gh-release@v2.0.8
with:
files: ${{ github.workspace }}/custom_components/ph803w/ph803w.zip
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,25 @@ With a lot of inspiration and help from https://github.com/Apollon77/node-ph803w
Still a lot left to do but at least it can poll the device and show values in Home Assistant.
In desktop mode (running cyclic with lib/main.py) it performs a bit better.

## Installation of HA component
# Installation

1. Clone this repo as `ph803w` dir into `$HA_CONFIG_DIR/custom_components/`
```
$ cd custom_components
$ git clone git@github.com:dala318/ph803w.git ./ph803w
```
2. Setup `$HA_CONFIG_DIR/configuration.yaml`
## Option 1: HACS
1. Go to HACS -> Integrations
2. Click the three dots on the top right and select `Custom Repositories`
3. Enter `https://github.com/dala318/python_ph803w` as repository, select the category `Integration` and click Add
4. A new custom integration shows up for installation (PH-803W) - install it
5. Restart Home Assistant

## Option 2: Manual

1. Copy the `ph803w` folder to HA `<config_dir>/custom_components/ph803w/`
2. Restart Home Assistant

# Configuration

Setup `$HA_CONFIG_DIR/configuration.yaml`

```yaml
ph803w:
host: 192.168.1.2 # IP of your device
```
## Changelog
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 6 additions & 5 deletions manifest.json → custom_components/ph803w/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"domain": "ph803w",
"name": "API polling for PH-803W pH and ORP sensor",
"documentation": "https://github.com/dala318/python_ph803w",
"version": "0.0.1",
"dependencies": [],
"after_dependencies": [],
"iot_class": "local_polling",
"codeowners": ["@dala318"],
"requirements": []
"dependencies": [],
"documentation": "https://github.com/dala318/python_ph803w",
"iot_class": "local_polling",
"issue_tracker": "https://github.com/dala318/python_ph803w/issues",
"requirements": [],
"version": "0.0.3"
}
File renamed without changes.
6 changes: 6 additions & 0 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "PH-803W",
"render_readme": true,
"zip_release": true,
"filename": "ph803w.zip"
}
Loading