Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Blyler <[email protected]>
  • Loading branch information
ablyler committed Oct 25, 2023
1 parent 65e1c8f commit 6d0ec72
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
22 changes: 11 additions & 11 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
"customizations": {
"vscode": {
"extensions": [
"donjayamanne.python-environment-manager",
"esbenp.prettier-vscode",
"GitHub.copilot-chat",
"github.vscode-github-actions",
"GitHub.vscode-pull-request-github",
"ms-azuretools.vscode-docker",
"ms-python.python",
"redhat.vscode-yaml",
"visualstudioexptteam.vscodeintellicode",
"trunk.io"
]
"donjayamanne.python-environment-manager",
"esbenp.prettier-vscode",
"GitHub.copilot-chat",
"github.vscode-github-actions",
"GitHub.vscode-pull-request-github",
"ms-azuretools.vscode-docker",
"ms-python.python",
"redhat.vscode-yaml",
"visualstudioexptteam.vscodeintellicode",
"trunk.io"
]
}
},

Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# home-assistant-aquahawk

[![GitHub Release][releases-shield]][releases]
[![hacs][hacsbadge]][hacs]

Expand All @@ -7,18 +8,21 @@ This custom component for Home Assistant adds support for for reading water usag
## Installation instruction

### HACS

The easiest way to install this integration is with [HACS][hacs]. First, install [HACS][hacs-download] if you don't have it yet. In Home Assistant, go to `HACS -> Integrations`, click on `+ Explore & Download Repositories`, search for `AquaHawk`, and click download. After download, restart Home Assistant.

Once the integration is installed, you can add it to the Home Assistant by going to `Configuration -> Devices & Services`, clicking `+ Add Integration` and searching for `AquaHawk` or, using My Home Assistant service, you can click on:

[![Add AquaHawk][add-integration-badge]][add-integration]

### Manual installation

1. Update Home Assistant to version 2021.12 or newer.
2. Clone this repository.
3. Copy the `custom_components/aquahawk` folder into your Home Assistant's `custom_components` folder.

### Configuring

1. Add `AquaHawk` integration via UI.
2. Enter AquaHawk cloud hostname, account id, username, and password.
3. The integration will discover appliance on local network(s).
Expand All @@ -27,16 +31,16 @@ Once the integration is installed, you can add it to the Home Assistant by going

## Known issues

* Sensor values are delayed due to the infrequent sending of data from the water meters to the cloud. The delay is usually many hours to a day in my experience.
- Sensor values are delayed due to the infrequent sending of data from the water meters to the cloud. The delay is usually many hours to a day in my experience.

## Supported entities

This custom component creates following entities for each discovered dehumidifier:

Platform | Description
-- | --
`sensor` | Sensor for water usage today.
`sensor` | Sensor for water usage this year.
| Platform | Description |
| -------- | --------------------------------- |
| `sensor` | Sensor for water usage today. |
| `sensor` | Sensor for water usage this year. |

## Energy dashboard

Expand All @@ -61,7 +65,7 @@ On entry page, paste following content:
```yaml
service: logger.set_level
data:
custom_components.aquahawk: DEBUG
custom_components.aquahawk: DEBUG
```
It is possible to activate debug logging on Home Assistent start. To do this, open Home Assistant's `configuration.yaml` file on your machine, and add following to `logger` configuration:
Expand All @@ -76,9 +80,6 @@ logger:

Home Assistant needs to be restarted after this change.




## Notice

AquaHawk and other names are trademarks of their respective owners.
Expand All @@ -93,4 +94,4 @@ AquaHawk and other names are trademarks of their respective owners.
[ha-service]: https://my.home-assistant.io/redirect/developer_call_service/?service=logger.set_level
[ha-service-badge]: https://my.home-assistant.io/badges/developer_call_service.svg
[releases-shield]: https://img.shields.io/github/release/ablyler/home-assistant-aquahawk.svg?style=flat
[releases]: https://github.com/ablyler/home-assistant-aquahawk/releases
[releases]: https://github.com/ablyler/home-assistant-aquahawk/releases
4 changes: 2 additions & 2 deletions custom_components/aquahawk/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import logging
from typing import Any, Dict, Optional

import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from aquahawk_client import AquaHawkClient, AuthenticationError
from homeassistant import config_entries, core
import homeassistant.helpers.config_validation as cv
import voluptuous as vol

from .const import (
CONF_ACCOUNT_NUMBER,
Expand Down
6 changes: 3 additions & 3 deletions custom_components/aquahawk/sensor.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
"""AquaHawk sensor platform."""
import logging
from datetime import timedelta
import logging

import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from aquahawk_client import AquaHawkClient
from homeassistant import config_entries, core
from homeassistant.components.sensor import (
Expand All @@ -13,6 +11,8 @@
SensorStateClass,
)
from homeassistant.const import UnitOfVolume
import homeassistant.helpers.config_validation as cv
import voluptuous as vol

from .const import (
CONF_ACCOUNT_NUMBER,
Expand Down

0 comments on commit 6d0ec72

Please sign in to comment.