From 08fb9cb5b92b04a7927bd98b8f586c45676a020f Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Tue, 3 Oct 2023 01:49:24 +0200 Subject: [PATCH] Add changing fan position for ac #97 #108 --- README.md | 4 +- custom_components/hon/const.py | 18 +++++++++ custom_components/hon/select.py | 14 +++++++ custom_components/hon/translations/cs.json | 22 +++++++++++ custom_components/hon/translations/de.json | 22 +++++++++++ custom_components/hon/translations/el.json | 22 +++++++++++ custom_components/hon/translations/en.json | 22 +++++++++++ custom_components/hon/translations/es.json | 22 +++++++++++ custom_components/hon/translations/fr.json | 22 +++++++++++ custom_components/hon/translations/he.json | 22 +++++++++++ custom_components/hon/translations/hr.json | 22 +++++++++++ custom_components/hon/translations/it.json | 22 +++++++++++ custom_components/hon/translations/nl.json | 22 +++++++++++ custom_components/hon/translations/pl.json | 22 +++++++++++ custom_components/hon/translations/pt.json | 22 +++++++++++ custom_components/hon/translations/ro.json | 22 +++++++++++ custom_components/hon/translations/ru.json | 22 +++++++++++ custom_components/hon/translations/sk.json | 22 +++++++++++ custom_components/hon/translations/sl.json | 22 +++++++++++ custom_components/hon/translations/sr.json | 22 +++++++++++ custom_components/hon/translations/tr.json | 22 +++++++++++ custom_components/hon/translations/zh.json | 22 +++++++++++ info.md | 2 +- scripts/translation_keys.py | 44 ++++++++++++++++++++++ 24 files changed, 498 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3b7fed6..761044a 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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` | diff --git a/custom_components/hon/const.py b/custom_components/hon/const.py index 03c7a13..69bc540 100644 --- a/custom_components/hon/const.py +++ b/custom_components/hon/const.py @@ -264,3 +264,21 @@ STAIN_TYPES: dict[int, str] = { 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", +} diff --git a/custom_components/hon/select.py b/custom_components/hon/select.py index 58a11c1..60bb071 100644 --- a/custom_components/hon/select.py +++ b/custom_components/hon/select.py @@ -140,6 +140,20 @@ SELECTS: dict[str, tuple[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( diff --git a/custom_components/hon/translations/cs.json b/custom_components/hon/translations/cs.json index 72a777a..8a27abb 100644 --- a/custom_components/hon/translations/cs.json +++ b/custom_components/hon/translations/cs.json @@ -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": { diff --git a/custom_components/hon/translations/de.json b/custom_components/hon/translations/de.json index b21e01a..5a626a2 100644 --- a/custom_components/hon/translations/de.json +++ b/custom_components/hon/translations/de.json @@ -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": { diff --git a/custom_components/hon/translations/el.json b/custom_components/hon/translations/el.json index 2ebaee7..e767bb2 100644 --- a/custom_components/hon/translations/el.json +++ b/custom_components/hon/translations/el.json @@ -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": { diff --git a/custom_components/hon/translations/en.json b/custom_components/hon/translations/en.json index 8a331e9..129c5d0 100644 --- a/custom_components/hon/translations/en.json +++ b/custom_components/hon/translations/en.json @@ -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": { diff --git a/custom_components/hon/translations/es.json b/custom_components/hon/translations/es.json index 17100cb..167b377 100644 --- a/custom_components/hon/translations/es.json +++ b/custom_components/hon/translations/es.json @@ -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": { diff --git a/custom_components/hon/translations/fr.json b/custom_components/hon/translations/fr.json index 698f09b..c2267a8 100644 --- a/custom_components/hon/translations/fr.json +++ b/custom_components/hon/translations/fr.json @@ -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": { diff --git a/custom_components/hon/translations/he.json b/custom_components/hon/translations/he.json index d1dc0bf..c73387f 100644 --- a/custom_components/hon/translations/he.json +++ b/custom_components/hon/translations/he.json @@ -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": { diff --git a/custom_components/hon/translations/hr.json b/custom_components/hon/translations/hr.json index a4acff1..8e0d1b2 100644 --- a/custom_components/hon/translations/hr.json +++ b/custom_components/hon/translations/hr.json @@ -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": { diff --git a/custom_components/hon/translations/it.json b/custom_components/hon/translations/it.json index c13896a..a69b19e 100644 --- a/custom_components/hon/translations/it.json +++ b/custom_components/hon/translations/it.json @@ -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": { diff --git a/custom_components/hon/translations/nl.json b/custom_components/hon/translations/nl.json index 795966d..9a6f314 100644 --- a/custom_components/hon/translations/nl.json +++ b/custom_components/hon/translations/nl.json @@ -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": { diff --git a/custom_components/hon/translations/pl.json b/custom_components/hon/translations/pl.json index 97f454c..373b852 100644 --- a/custom_components/hon/translations/pl.json +++ b/custom_components/hon/translations/pl.json @@ -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": { diff --git a/custom_components/hon/translations/pt.json b/custom_components/hon/translations/pt.json index 1084b88..9282bb5 100644 --- a/custom_components/hon/translations/pt.json +++ b/custom_components/hon/translations/pt.json @@ -1764,6 +1764,28 @@ "unknown": "unknown" }, "name": "Nível da nódoa" + }, + "fan_horizontal": { + "name": "Direção do ventilador Horizontal", + "state": { + "position_1": "Fixa - Posição 1", + "position_2": "Fixa - Posição 2", + "position_3": "Fixa - Posição 3", + "position_4": "Fixa - Posição 4", + "position_5": "Fixa - Posição 5", + "swing": "Oscilação" + } + }, + "fan_vertical": { + "name": "Direção do ventilador Vertical", + "state": { + "position_1": "Fixa - Posição 1", + "position_2": "Fixa - Posição 2", + "position_3": "Fixa - Posição 3", + "position_4": "Fixa - Posição 4", + "position_5": "Fixa - Posição 5", + "swing": "Oscilação" + } } }, "switch": { diff --git a/custom_components/hon/translations/ro.json b/custom_components/hon/translations/ro.json index 2d592a9..ca6e7f1 100644 --- a/custom_components/hon/translations/ro.json +++ b/custom_components/hon/translations/ro.json @@ -1764,6 +1764,28 @@ "unknown": "unknown" }, "name": "Nivelul de pătare" + }, + "fan_horizontal": { + "name": "Direcția ventilatorului Orizontal", + "state": { + "position_1": "Fix - Poziție 1", + "position_2": "Fix - Poziție 2", + "position_3": "Fix - Poziție 3", + "position_4": "Fix - Poziție 4", + "position_5": "Fix - Poziție 5", + "swing": "Baleiere" + } + }, + "fan_vertical": { + "name": "Direcția ventilatorului Vertical", + "state": { + "position_1": "Fix - Poziție 1", + "position_2": "Fix - Poziție 2", + "position_3": "Fix - Poziție 3", + "position_4": "Fix - Poziție 4", + "position_5": "Fix - Poziție 5", + "swing": "Baleiere" + } } }, "switch": { diff --git a/custom_components/hon/translations/ru.json b/custom_components/hon/translations/ru.json index 8a907c8..99ae650 100644 --- a/custom_components/hon/translations/ru.json +++ b/custom_components/hon/translations/ru.json @@ -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": { diff --git a/custom_components/hon/translations/sk.json b/custom_components/hon/translations/sk.json index 27a8d6c..ac60dcf 100644 --- a/custom_components/hon/translations/sk.json +++ b/custom_components/hon/translations/sk.json @@ -1764,6 +1764,28 @@ "unknown": "unknown" }, "name": "Úroveň škvŕn" + }, + "fan_horizontal": { + "name": "Smer ventilátora Horizontálny", + "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": "Otáčanie" + } + }, + "fan_vertical": { + "name": "Smer ventilátora Vertikálny", + "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": "Otáčanie" + } } }, "switch": { diff --git a/custom_components/hon/translations/sl.json b/custom_components/hon/translations/sl.json index 954293d..5dd5b31 100644 --- a/custom_components/hon/translations/sl.json +++ b/custom_components/hon/translations/sl.json @@ -1764,6 +1764,28 @@ "unknown": "unknown" }, "name": "Stopnja madežev" + }, + "fan_horizontal": { + "name": "Smer ventilatorja 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": "Nihanje" + } + }, + "fan_vertical": { + "name": "Smer ventilatorja Navpično", + "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": "Nihanje" + } } }, "switch": { diff --git a/custom_components/hon/translations/sr.json b/custom_components/hon/translations/sr.json index 3c94f97..2e7cff0 100644 --- a/custom_components/hon/translations/sr.json +++ b/custom_components/hon/translations/sr.json @@ -1764,6 +1764,28 @@ "unknown": "unknown" }, "name": "Nivo mrlje" + }, + "fan_horizontal": { + "name": "Pravac duvanja ventilatora Horizontalan", + "state": { + "position_1": "Fiksiran - Položaj 1", + "position_2": "Fiksiran - Položaj 2", + "position_3": "Fiksiran - Položaj 3", + "position_4": "Fiksiran - Položaj 4", + "position_5": "Fiksiran - Položaj 5", + "swing": "Njihanje" + } + }, + "fan_vertical": { + "name": "Pravac duvanja ventilatora Vertikalan", + "state": { + "position_1": "Fiksiran - Položaj 1", + "position_2": "Fiksiran - Položaj 2", + "position_3": "Fiksiran - Položaj 3", + "position_4": "Fiksiran - Položaj 4", + "position_5": "Fiksiran - Položaj 5", + "swing": "Njihanje" + } } }, "switch": { diff --git a/custom_components/hon/translations/tr.json b/custom_components/hon/translations/tr.json index 9af7407..7d9847a 100644 --- a/custom_components/hon/translations/tr.json +++ b/custom_components/hon/translations/tr.json @@ -1764,6 +1764,28 @@ "unknown": "unknown" }, "name": "Leke seviyesi" + }, + "fan_horizontal": { + "name": "Fan yönü Yatay", + "state": { + "position_1": "Sabit - Pozisyon 1", + "position_2": "Sabit - Pozisyon 2", + "position_3": "Sabit - Pozisyon 3", + "position_4": "Sabit - Pozisyon 4", + "position_5": "Sabit - Pozisyon 5", + "swing": "Salınım" + } + }, + "fan_vertical": { + "name": "Fan yönü Dikey", + "state": { + "position_1": "Sabit - Pozisyon 1", + "position_2": "Sabit - Pozisyon 2", + "position_3": "Sabit - Pozisyon 3", + "position_4": "Sabit - Pozisyon 4", + "position_5": "Sabit - Pozisyon 5", + "swing": "Salınım" + } } }, "switch": { diff --git a/custom_components/hon/translations/zh.json b/custom_components/hon/translations/zh.json index 81076f9..dc44e38 100644 --- a/custom_components/hon/translations/zh.json +++ b/custom_components/hon/translations/zh.json @@ -1750,6 +1750,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": { diff --git a/info.md b/info.md index 52787eb..4295498 100644 --- a/info.md +++ b/info.md @@ -12,7 +12,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) diff --git a/scripts/translation_keys.py b/scripts/translation_keys.py index f5f7a71..a1d550b 100644 --- a/scripts/translation_keys.py +++ b/scripts/translation_keys.py @@ -85,6 +85,40 @@ AC_HUMAN_SENSE = { "unknown": "unknown", } +AC_POSITIONS = { + "position_1": [ + "AC.PROGRAM_DETAIL.FAN_MODE_FIXED", + "-", + "AC.PROGRAM_DETAIL.POSITION", + "1", + ], + "position_2": [ + "AC.PROGRAM_DETAIL.FAN_MODE_FIXED", + "-", + "AC.PROGRAM_DETAIL.POSITION", + "2", + ], + "position_3": [ + "AC.PROGRAM_DETAIL.FAN_MODE_FIXED", + "-", + "AC.PROGRAM_DETAIL.POSITION", + "3", + ], + "position_4": [ + "AC.PROGRAM_DETAIL.FAN_MODE_FIXED", + "-", + "AC.PROGRAM_DETAIL.POSITION", + "4", + ], + "position_5": [ + "AC.PROGRAM_DETAIL.FAN_MODE_FIXED", + "-", + "AC.PROGRAM_DETAIL.POSITION", + "5", + ], + "swing": "AC.PROGRAM_DETAIL.FAN_MODE_SWING", +} + AP_MACH_MODE = { "standby": "AP.RUNNING_MODE.STANDBY", "sleep": "AP.RUNNING_MODE.SLEEP", @@ -178,6 +212,8 @@ SELECT = { "diffuser": AP_DIFFUSER_LEVEL, "dirt_level": DIRTY_LEVEL, "stain_type": STAINS, + "fan_horizontal": AC_POSITIONS, + "fan_vertical": AC_POSITIONS, } PROGRAMS = { @@ -344,6 +380,14 @@ NAMES = { "steam_level": "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_MAIN_OPTIONS.STEAM_LEVEL", "dirt_level": "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_MAIN_OPTIONS.DIRTY_LEVEL", "stain_type": "STAIN_TYPE_LIST.STAINS.STAIN_LEVEL", + "fan_horizontal": [ + "AC.PROGRAM_DETAIL.FAN_DIRECTION", + "AC.PROGRAM_DETAIL.FAN_DIRECTION_HORIZONTAL", + ], + "fan_vertical": [ + "AC.PROGRAM_DETAIL.FAN_DIRECTION", + "AC.PROGRAM_DETAIL.FAN_DIRECTION_VERTICAL", + ], }, "sensor": { "dry_levels": "WASHING_CMD&CTRL.DRAWER_CYCLE_DRYING.TAB_LEVEL",