mirror of
https://github.com/Andre0512/hon.git
synced 2024-01-19 02:50:19 +00:00
Add contribution instructions to readme
This commit is contained in:
parent
03a1e40b6e
commit
88c76b8056
2
.github/workflows/hacs_check.yml
vendored
2
.github/workflows/hacs_check.yml
vendored
|
@ -14,4 +14,4 @@ jobs:
|
||||||
- name: HACS Action
|
- name: HACS Action
|
||||||
uses: "hacs/action@main"
|
uses: "hacs/action@main"
|
||||||
with:
|
with:
|
||||||
category: "integration"
|
category: "integration"
|
||||||
|
|
2
.github/workflows/validate.yml
vendored
2
.github/workflows/validate.yml
vendored
|
@ -11,4 +11,4 @@ jobs:
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v3"
|
- uses: "actions/checkout@v3"
|
||||||
- uses: "home-assistant/actions/hassfest@master"
|
- uses: "home-assistant/actions/hassfest@master"
|
||||||
|
|
49
README.md
49
README.md
|
@ -1,5 +1,7 @@
|
||||||
# Haier hOn
|
# Haier hOn
|
||||||
Home Assistant component supporting hOn cloud.
|
[![hacs_badge](https://img.shields.io/badge/HACS-Custom-41BDF5.svg)](https://github.com/hacs/integration)
|
||||||
|
|
||||||
|
Home Assistant component supporting devices of Haier's mobile app **hOn**.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
#### Installing via HACS
|
#### Installing via HACS
|
||||||
|
@ -14,6 +16,51 @@ Home Assistant component supporting hOn cloud.
|
||||||
9. Search for Haier hOn
|
9. Search for Haier hOn
|
||||||
10. Type your username used in the hOn App and hit submit
|
10. Type your username used in the hOn App and hit submit
|
||||||
|
|
||||||
|
## Contribute
|
||||||
|
Any kind of contribution is welcome!
|
||||||
|
#### Add appliances or additional attributes
|
||||||
|
1. Install [pyhOn](https://github.com/Andre0512/pyhOn)
|
||||||
|
```commandline
|
||||||
|
$ pip install pyhOn
|
||||||
|
```
|
||||||
|
2. Use the commandline tool to read out all appliance data from your account
|
||||||
|
```commandline
|
||||||
|
$ pyhOn
|
||||||
|
User for hOn account: user.name@example.com
|
||||||
|
Password for hOn account: ********
|
||||||
|
========== WM - Washing Machine ==========
|
||||||
|
commands:
|
||||||
|
pauseProgram: pauseProgram command
|
||||||
|
resumeProgram: resumeProgram command
|
||||||
|
startProgram: startProgram command
|
||||||
|
stopProgram: stopProgram command
|
||||||
|
data:
|
||||||
|
actualWeight: 0
|
||||||
|
airWashTempLevel: 0
|
||||||
|
airWashTime: 0
|
||||||
|
antiAllergyStatus: 0
|
||||||
|
...
|
||||||
|
```
|
||||||
|
3. Fork this repository and clone it to your local machine
|
||||||
|
4. Add the keys of the attributes you'd like to have as `EntityDescription` into this Repository
|
||||||
|
_Example: Add pause button_
|
||||||
|
```python
|
||||||
|
BUTTONS: dict[str, tuple[ButtonEntityDescription, ...]] = {
|
||||||
|
"WM": ( # WM is the applianceTypeName
|
||||||
|
ButtonEntityDescription(
|
||||||
|
key="pauseProgram", # key from pyhOn
|
||||||
|
name="Pause Program", # name in home assistant
|
||||||
|
icon="mdi:pause", # icon in home assistant
|
||||||
|
...
|
||||||
|
),
|
||||||
|
...
|
||||||
|
```
|
||||||
|
5. Create a [pull request](https://github.com/Andre0512/hon/pulls)
|
||||||
|
|
||||||
|
#### Tips and Tricks
|
||||||
|
- If you want to have some states humanreadable, have a look at the `translation_key` parameter of the `EntityDescription`
|
||||||
|
- If you need to implement some more logic, create a pull request to the underlying library. There we collect special requirements in the `appliances` directory.
|
||||||
|
|
||||||
## Supported Appliances
|
## Supported Appliances
|
||||||
- Washing Machine
|
- Washing Machine
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue