You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
drudgebg ae6d28f520
Update number.py
1 year ago
.github/workflows Add contribution instructions to readme 1 year ago
custom_components/hon Update number.py 1 year ago
.gitignore More functions 1 year ago
LICENSE Update README, add license 1 year ago
README.md Add contribution instructions to readme 1 year ago
hacs.json Rename repo 1 year ago

README.md

Haier hOn

hacs_badge

Home Assistant component supporting devices of Haier's mobile app hOn.

Installation

Installing via HACS

  1. You need to have installed HACS
  2. Go to HACS->Integrations
  3. Add this repo (https://github.com/Andre0512/hon.git) into your HACS custom repositories
  4. Search for Haier hOn and Download it
  5. Restart your HomeAssistant
  6. Go to Settings->Devices & Services
  7. Shift reload your browser
  8. Click Add Integration
  9. Search for Haier hOn
  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
     $ pip install pyhOn
    
  2. Use the commandline tool to read out all appliance data from your account
    $ 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
    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

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

  • Washing Machine

Tested Devices

  • Haier WD90

About this Repo

The existing integrations missed some features from the app I liked to have in HomeAssistant. I tried to create a pull request, but in the structures of these existing repos, I find it hard to fit in my needs, so I basically rewrote everything. I moved the api related stuff into the package pyhOn.