|
5 | 5 |
|
6 | 6 |  |
7 | 7 | # 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. |
10 | 9 |
|
11 | | -## Stand-alone usage |
12 | | -You only need the file [poollab.py](custom_components/poollab/poollab.py) |
| 10 | +## Home Assistant integration |
13 | 11 |
|
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 |
19 | 13 |
|
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 | +[](https://my.home-assistant.io/redirect/hacs_repository/?owner=dala318&repository=python_poollab) |
| 18 | + |
| 19 | +_or_ |
21 | 20 |
|
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. ⬇️ |
27 | 25 | 5. Restart Home Assistant |
28 | 26 |
|
29 | 27 | ### 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 |
33 | 35 | 4. Each pool in your account should be shown as an own device which you can add to a room |
34 | 36 |
|
35 | 37 |  |
36 | 38 |
|
37 | 39 | ### Entity attributes |
38 | 40 | 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: |
40 | 42 | * `Measured at`: The device timestamp at measure |
41 | 43 | * `Measure`: The unique id of the measure |
42 | 44 | * `Ideal low`: Lower limit for ok |
43 | 45 | * `Ideal high`: Upper limit for ok |
44 | 46 | * `Device serial`: Device serial of the device that made the measure |
45 | 47 | * `Operator name`: Mane of operator that did the measurement |
46 | 48 | * `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 | +``` |
0 commit comments