Skip to content

Commit

Permalink
Add changing fan position for ac Andre0512#97 Andre0512#108
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed Oct 2, 2023
1 parent 0e3d917 commit 08fb9cb
Show file tree
Hide file tree
Showing 24 changed files with 498 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Home Assistant integration for [Haier's mobile app hOn](https://hon-smarthome.co
[![Supported Languages](https://img.shields.io/badge/Languages-19-royalblue)](https://github.com/Andre0512/hon#supported-languages)
[![Supported Appliances](https://img.shields.io/badge/Appliances-11-forestgreen)](https://github.com/Andre0512/hon#supported-appliances)
[![Supported Models](https://img.shields.io/badge/Models-73-yellowgreen)](https://github.com/Andre0512/hon#supported-models)
[![Supported Entities](https://img.shields.io/badge/Entities-313-crimson)](https://github.com/Andre0512/hon#appliance-features)
[![Supported Entities](https://img.shields.io/badge/Entities-315-crimson)](https://github.com/Andre0512/hon#appliance-features)

## Supported Appliances
- [Washing Machine](https://github.com/Andre0512/hon#washing-machine)
Expand Down Expand Up @@ -173,6 +173,8 @@ For every device exists a button under diagnostics which can be used to log all
| Echo | `account-voice` | `switch` | `echoStatus` |
| Eco Mode | `sprout` | `switch` | `ecoMode` |
| Eco Pilot | `run` | `select` | `settings.humanSensingStatus` |
| Fan Direction Horizontal | `fan` | `select` | `settings.windDirectionHorizontal` |
| Fan Direction Vertical | `fan` | `select` | `settings.windDirectionVertical` |
| Health Mode | `medication-outline` | `switch` | `healthMode` |
| Night Mode | `bed` | `switch` | `silentSleepStatus` |
| Rapid Mode | `run-fast` | `switch` | `rapidMode` |
Expand Down
18 changes: 18 additions & 0 deletions custom_components/hon/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,21 @@
25: "chili_sauce",
26: "fruit",
}

AC_POSITION_HORIZONTAL = {
0: "position_1",
3: "position_2",
4: "position_3",
5: "position_4",
6: "position_5",
7: "swing",
}

AC_POSITION_VERTICAL = {
2: "position_1",
4: "position_2",
5: "position_3",
6: "position_4",
7: "position_5",
8: "swing",
}
14 changes: 14 additions & 0 deletions custom_components/hon/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ class HonConfigSelectEntityDescription(SelectEntityDescription):
translation_key="eco_pilot",
option_list=const.AC_HUMAN_SENSE,
),
HonSelectEntityDescription(
key="settings.windDirectionHorizontal",
name="Fan Direction Horizontal",
icon="mdi:fan",
translation_key="fan_horizontal",
option_list=const.AC_POSITION_HORIZONTAL,
),
HonSelectEntityDescription(
key="settings.windDirectionVertical",
name="Fan Direction Vertical",
icon="mdi:fan",
translation_key="fan_vertical",
option_list=const.AC_POSITION_VERTICAL,
),
),
"REF": (
HonConfigSelectEntityDescription(
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,28 @@
"unknown": "unknown"
},
"name": "Úroveň znečištění"
},
"fan_horizontal": {
"name": "Směr proudu vzduchu Vodorovný",
"state": {
"position_1": "Pevný - Poloha 1",
"position_2": "Pevný - Poloha 2",
"position_3": "Pevný - Poloha 3",
"position_4": "Pevný - Poloha 4",
"position_5": "Pevný - Poloha 5",
"swing": "Pohyb lamel"
}
},
"fan_vertical": {
"name": "Směr proudu vzduchu Svislý",
"state": {
"position_1": "Pevný - Poloha 1",
"position_2": "Pevný - Poloha 2",
"position_3": "Pevný - Poloha 3",
"position_4": "Pevný - Poloha 4",
"position_5": "Pevný - Poloha 5",
"swing": "Pohyb lamel"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,28 @@
"unknown": "unknown"
},
"name": "Grad der Verschmutzung"
},
"fan_horizontal": {
"name": "Richtung des Gebläses Horizontal",
"state": {
"position_1": "Fest - Position 1",
"position_2": "Fest - Position 2",
"position_3": "Fest - Position 3",
"position_4": "Fest - Position 4",
"position_5": "Fest - Position 5",
"swing": "Schwenkbewegung"
}
},
"fan_vertical": {
"name": "Richtung des Gebläses Vertikal",
"state": {
"position_1": "Fest - Position 1",
"position_2": "Fest - Position 2",
"position_3": "Fest - Position 3",
"position_4": "Fest - Position 4",
"position_5": "Fest - Position 5",
"swing": "Schwenkbewegung"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,28 @@
"unknown": "unknown"
},
"name": "Επίπεδο λεκέδων"
},
"fan_horizontal": {
"name": "Κατεύθυνση ανεμιστήρα Οριζόντιος",
"state": {
"position_1": "Σταθερός - Θέση 1",
"position_2": "Σταθερός - Θέση 2",
"position_3": "Σταθερός - Θέση 3",
"position_4": "Σταθερός - Θέση 4",
"position_5": "Σταθερός - Θέση 5",
"swing": "Ταλάντευση"
}
},
"fan_vertical": {
"name": "Κατεύθυνση ανεμιστήρα Κατακόρυφος",
"state": {
"position_1": "Σταθερός - Θέση 1",
"position_2": "Σταθερός - Θέση 2",
"position_3": "Σταθερός - Θέση 3",
"position_4": "Σταθερός - Θέση 4",
"position_5": "Σταθερός - Θέση 5",
"swing": "Ταλάντευση"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,28 @@
"unknown": "unknown"
},
"name": "Stain level"
},
"fan_horizontal": {
"name": "Fan direction Horizontal",
"state": {
"position_1": "Fixed - Position 1",
"position_2": "Fixed - Position 2",
"position_3": "Fixed - Position 3",
"position_4": "Fixed - Position 4",
"position_5": "Fixed - Position 5",
"swing": "Swing"
}
},
"fan_vertical": {
"name": "Fan direction Vertical",
"state": {
"position_1": "Fixed - Position 1",
"position_2": "Fixed - Position 2",
"position_3": "Fixed - Position 3",
"position_4": "Fixed - Position 4",
"position_5": "Fixed - Position 5",
"swing": "Swing"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,28 @@
"unknown": "unknown"
},
"name": "Nivel de manchas"
},
"fan_horizontal": {
"name": "Dirección del ventilador Horizontal",
"state": {
"position_1": "Fijo - Posición 1",
"position_2": "Fijo - Posición 2",
"position_3": "Fijo - Posición 3",
"position_4": "Fijo - Posición 4",
"position_5": "Fijo - Posición 5",
"swing": "Oscilar"
}
},
"fan_vertical": {
"name": "Dirección del ventilador Vertical",
"state": {
"position_1": "Fijo - Posición 1",
"position_2": "Fijo - Posición 2",
"position_3": "Fijo - Posición 3",
"position_4": "Fijo - Posición 4",
"position_5": "Fijo - Posición 5",
"swing": "Oscilar"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,28 @@
"unknown": "unknown"
},
"name": "Niveau de salissure"
},
"fan_horizontal": {
"name": "Direction du ventilateur Horizontale",
"state": {
"position_1": "Fixe - Position 1",
"position_2": "Fixe - Position 2",
"position_3": "Fixe - Position 3",
"position_4": "Fixe - Position 4",
"position_5": "Fixe - Position 5",
"swing": "Oscillation"
}
},
"fan_vertical": {
"name": "Direction du ventilateur Verticale",
"state": {
"position_1": "Fixe - Position 1",
"position_2": "Fixe - Position 2",
"position_3": "Fixe - Position 3",
"position_4": "Fixe - Position 4",
"position_5": "Fixe - Position 5",
"swing": "Oscillation"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,28 @@
"unknown": "unknown"
},
"name": "Stain level"
},
"fan_horizontal": {
"name": "Fan direction Horizontal",
"state": {
"position_1": "Fixed - Position 1",
"position_2": "Fixed - Position 2",
"position_3": "Fixed - Position 3",
"position_4": "Fixed - Position 4",
"position_5": "Fixed - Position 5",
"swing": "Swing"
}
},
"fan_vertical": {
"name": "Fan direction Vertical",
"state": {
"position_1": "Fixed - Position 1",
"position_2": "Fixed - Position 2",
"position_3": "Fixed - Position 3",
"position_4": "Fixed - Position 4",
"position_5": "Fixed - Position 5",
"swing": "Swing"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,28 @@
"unknown": "unknown"
},
"name": "Razina mrlja"
},
"fan_horizontal": {
"name": "Smjer ventilatora Vodoravno",
"state": {
"position_1": "Fiksno - Položaj 1",
"position_2": "Fiksno - Položaj 2",
"position_3": "Fiksno - Položaj 3",
"position_4": "Fiksno - Položaj 4",
"position_5": "Fiksno - Položaj 5",
"swing": "Njihanje"
}
},
"fan_vertical": {
"name": "Smjer ventilatora Okomito",
"state": {
"position_1": "Fiksno - Položaj 1",
"position_2": "Fiksno - Položaj 2",
"position_3": "Fiksno - Položaj 3",
"position_4": "Fiksno - Položaj 4",
"position_5": "Fiksno - Položaj 5",
"swing": "Njihanje"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,28 @@
"unknown": "unknown"
},
"name": "Livello di sporco"
},
"fan_horizontal": {
"name": "Direzione ventola Orizzontale",
"state": {
"position_1": "Fissa - Posizione 1",
"position_2": "Fissa - Posizione 2",
"position_3": "Fissa - Posizione 3",
"position_4": "Fissa - Posizione 4",
"position_5": "Fissa - Posizione 5",
"swing": "Swing"
}
},
"fan_vertical": {
"name": "Direzione ventola Verticale",
"state": {
"position_1": "Fissa - Posizione 1",
"position_2": "Fissa - Posizione 2",
"position_3": "Fissa - Posizione 3",
"position_4": "Fissa - Posizione 4",
"position_5": "Fissa - Posizione 5",
"swing": "Swing"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,28 @@
"unknown": "unknown"
},
"name": "Vlekniveau"
},
"fan_horizontal": {
"name": "Ventilatorrichting Horizontaal",
"state": {
"position_1": "Vast - Positie 1",
"position_2": "Vast - Positie 2",
"position_3": "Vast - Positie 3",
"position_4": "Vast - Positie 4",
"position_5": "Vast - Positie 5",
"swing": "Draaiend"
}
},
"fan_vertical": {
"name": "Ventilatorrichting Verticaal",
"state": {
"position_1": "Vast - Positie 1",
"position_2": "Vast - Positie 2",
"position_3": "Vast - Positie 3",
"position_4": "Vast - Positie 4",
"position_5": "Vast - Positie 5",
"swing": "Draaiend"
}
}
},
"switch": {
Expand Down
22 changes: 22 additions & 0 deletions custom_components/hon/translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,28 @@
"unknown": "unknown"
},
"name": "Stopień zabrudzenia"
},
"fan_horizontal": {
"name": "Kierunek wentylatora Poziomy",
"state": {
"position_1": "Stały - Pozycja 1",
"position_2": "Stały - Pozycja 2",
"position_3": "Stały - Pozycja 3",
"position_4": "Stały - Pozycja 4",
"position_5": "Stały - Pozycja 5",
"swing": "Swing"
}
},
"fan_vertical": {
"name": "Kierunek wentylatora Pionowy",
"state": {
"position_1": "Stały - Pozycja 1",
"position_2": "Stały - Pozycja 2",
"position_3": "Stały - Pozycja 3",
"position_4": "Stały - Pozycja 4",
"position_5": "Stały - Pozycja 5",
"swing": "Swing"
}
}
},
"switch": {
Expand Down
Loading

0 comments on commit 08fb9cb

Please sign in to comment.