gvigroux / hon

Support of all Haier, Candy, Hoover appliances integrated in the official hOn mobile app. Direct access to all possible services and parameters
MIT License
134 stars 49 forks source link

Program phase does not trigger automation #143

Open itnassol opened 1 month ago

itnassol commented 1 month ago

So the system lets me start the machine in any program, and when the program is over Washing Machine Program phase changes to ready. It shows ready...

image

If I add that to an automation, there is no option for ready.

image

even if I type it in it doesn't trigger the automation

image

Any ideas? Cheers.

deezid commented 1 month ago

Same here. Apperantely every single sensor only outputs some random looking numbers. No idea what to do with that :(

deezid commented 1 month ago

would really love to know if there is a way to give the numbers of the following sensors some meaning so I can use it for automations and my button card... Screenshot 2024-07-20 at 17 45 01 Screenshot 2024-07-20 at 17 44 32 Screenshot 2024-07-20 at 17 44 20

itnassol commented 1 month ago

Ok so you can use the numbers to trigger the automations. tried it this morning works well, as far as turning them into something more easy to read, I am sure you can build a template for that, I will try that later and let you know.

deezid commented 1 month ago

Working on a spreadsheet with the different program and mode codes right now https://docs.google.com/spreadsheets/d/13wfEgifyedUi9tCbetDZ9cWN4MffdONW0luWqEVW7uU/edit?usp=sharing

deezid commented 1 month ago

Nvm. The modes are already inside the other integration by @Andre0512

https://github.com/Andre0512/hon/blob/main/custom_components/hon/const.py

deezid commented 1 month ago

Screenshot 2024-07-21 at 12 31 26

Sooo, created some new template sensors, optimized for the template helper tool, so they can be added to the device directly. Feel free to use them.

New template sensors:

Washing Machine Program Phase 2:

{% set phase = states('sensor.washing_machine_program_phase') | int %}
{% set phases = {
    0: "ready",
    1: "washing",
    2: "washing",
    3: "spin",
    4: "rinse",
    5: "rinse",
    6: "rinse",
    7: "drying",
    8: "drying",
    9: "steam",
    10: "ready",
    11: "spin",
    12: "weighting",
    13: "weighting",
    14: "washing",
    15: "washing",
    16: "washing",
    17: "rinse",
    18: "rinse",
    19: "scheduled",
    20: "tumbling",
    24: "refresh",
    25: "washing",
    26: "heating",
    27: "washing"
} %}
{{ phases.get(phase, 'unknown') }}

Washing Machine Mode 2:

{% set mode = states('sensor.washing_machine_mode') | int %}
{% set modes = {
    0: "ready",
    1: "ready",
    2: "running",
    3: "pause",
    4: "scheduled",
    5: "scheduled",
    6: "error",
    7: "ready",
    8: "test",
    9: "ending"
} %}
{{ modes.get(mode, 'unknown') }}

Can't find any info about the program codes though... :( Anyway, here is the short version that can be updated in the future: Washing Machine Program Code 2:

{% set program_code = states('sensor.washing_machine_program_code') | int %}
{% set program_codes = {
    124: "Smart",
    136: "Cotton"
} %}
{{ program_codes.get(program_code, 'unknown') }}