Skip to content

Commit 91ac388

Browse files
authored
Merge pull request #57 from hmmbob/patch-1
Improvements for HA installation in readme
2 parents 27d115b + 30c915a commit 91ac388

File tree

2 files changed

+32
-20
lines changed

2 files changed

+32
-20
lines changed

README.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,54 @@
55

66
![Logo](PoolLab.jpg)
77
# Python PoolLab (Home Assistant)
8-
Python API for Pool Lab 1.0
9-
For now only fetching all data and parsing to classes.
8+
Python API for Pool Lab Photometers. For now only fetching all data and parsing to classes.
109

11-
## Stand-alone usage
12-
You only need the file [poollab.py](custom_components/poollab/poollab.py)
10+
## Home Assistant integration
1311

14-
```python
15-
from poollab import PoolLabApi
16-
poollab_api = PoolLabApi("API_TOKEN_FROM_https://labcom.cloud/pages/user-setting")
17-
print(asyncio.run(poollab_api.request()))
18-
```
12+
### Install via HACS
1913

20-
## Home Assistant integration
14+
> [!TIP]
15+
> Python Poollab is available in the default HACS repository. You can install it directly through HACS or click the button below to open it there.
16+
17+
[![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=dala318&repository=python_poollab)
18+
19+
_or_
2120

22-
### Install
23-
1. Go to HACS -> Integrations
24-
2. Click the three dots on the top right and select `Custom Repositories`
25-
3. Enter `https://github.com/dala318/python_poollab` as repository, select the category `Integration` and click Add
26-
4. A new custom integration shows up for installation (PoolLab) - install it
21+
1. Install HACS if you don't have it already
22+
2. Open HACS in Home Assistant
23+
3. Search for "Pool Lab"
24+
4. Click the download button. ⬇️
2725
5. Restart Home Assistant
2826

2927
### Configuration
30-
1. Get a API token to your cloud data from https://labcom.cloud/pages/user-setting
31-
2. Klick Add integration and select "poollab"
32-
3. In the configuration window enter the API token
28+
1. Get a Pool Lab API token to your cloud data from https://labcom.cloud/pages/user-setting
29+
2. Add the Pool Lab integration to your HA by clicking this My Home Assistant link: https://my.home-assistant.io/redirect/config_flow_start/?domain=poollab
30+
31+
_or_
32+
33+
Navigate to Home Assistant settings, "devices and integrations", click "Add integration" in the right bottom and select "Pool Lab"
34+
3. In the configuration window enter the API token obtained in step 1
3335
4. Each pool in your account should be shown as an own device which you can add to a room
3436

3537
![Example device](device_integration_example.png)
3638

3739
### Entity attributes
3840
Each sensor entity has the value of the last measurement of each parameter, based on the timestamp from device (not the one stored last)
39-
In addition some attributes are provided
41+
In addition some attributes are provided:
4042
* `Measured at`: The device timestamp at measure
4143
* `Measure`: The unique id of the measure
4244
* `Ideal low`: Lower limit for ok
4345
* `Ideal high`: Upper limit for ok
4446
* `Device serial`: Device serial of the device that made the measure
4547
* `Operator name`: Mane of operator that did the measurement
4648
* `Comment`: Comment to measurement
49+
50+
51+
## Stand-alone usage
52+
You only need the file [poollab.py](custom_components/poollab/poollab.py)
53+
54+
```python
55+
from poollab import PoolLabApi
56+
poollab_api = PoolLabApi("API_TOKEN_FROM_https://labcom.cloud/pages/user-setting")
57+
print(asyncio.run(poollab_api.request()))
58+
```

hacs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "PoolLab",
2+
"name": "Pool Lab",
33
"render_readme": true,
44
"zip_release": true,
55
"filename": "poollab.zip"

0 commit comments

Comments
 (0)