From 9dc98953a274fc0210d8b3db015cdec62b6c6f6d Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Mon, 10 Jul 2023 00:48:57 +0200 Subject: [PATCH] Add dirt level select entity --- README.md | 6 ++++-- custom_components/hon/select.py | 7 +++++++ custom_components/hon/sensor.py | 2 +- custom_components/hon/translations/cs.json | 9 +++++++++ custom_components/hon/translations/de.json | 9 +++++++++ custom_components/hon/translations/el.json | 9 +++++++++ custom_components/hon/translations/en.json | 9 +++++++++ custom_components/hon/translations/es.json | 9 +++++++++ custom_components/hon/translations/fr.json | 9 +++++++++ custom_components/hon/translations/he.json | 9 +++++++++ custom_components/hon/translations/hr.json | 9 +++++++++ custom_components/hon/translations/it.json | 9 +++++++++ custom_components/hon/translations/nl.json | 9 +++++++++ custom_components/hon/translations/pl.json | 9 +++++++++ custom_components/hon/translations/pt.json | 9 +++++++++ custom_components/hon/translations/ro.json | 9 +++++++++ custom_components/hon/translations/ru.json | 9 +++++++++ custom_components/hon/translations/sk.json | 9 +++++++++ custom_components/hon/translations/sl.json | 9 +++++++++ custom_components/hon/translations/sr.json | 9 +++++++++ custom_components/hon/translations/tr.json | 9 +++++++++ custom_components/hon/translations/zh.json | 9 +++++++++ scripts/translation_keys.py | 2 ++ 23 files changed, 185 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 91ffe35..2507253 100644 --- a/README.md +++ b/README.md @@ -424,6 +424,7 @@ For every device exists a button under diagnostics which can be used to log all | Auto Dose Softener | `teddy-bear` | `switch` | `startProgram.autoSoftenerStatus` | | Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` | | Delay Time | `timer-plus` | `number` | `startProgram.delayTime` | +| Dirty level | `liquid-spot` | `select` | `startProgram.dirtyLevel` | | Dry Time | | `number` | `startProgram.dryTime` | | Dry Time | `timer` | `select` | `startProgram.dryTimeMM` | | Dry level | `hair-dryer` | `select` | `startProgram.dryLevel` | @@ -459,7 +460,7 @@ For every device exists a button under diagnostics which can be used to log all | Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | | Current Temperature | `thermometer` | `sensor` | `temp` | | Current Water Used | `water` | `sensor` | `currentWaterUsed` | -| Dirt level | `liquid-spot` | `sensor` | `dirtyLevel` | +| Dirty level | `liquid-spot` | `sensor` | `dirtyLevel` | | Door | | `binary_sensor` | `doorStatus` | | Door Lock | | `binary_sensor` | `doorLockStatus` | | Dry level | `hair-dryer` | `sensor` | `dryLevel` | @@ -496,6 +497,7 @@ For every device exists a button under diagnostics which can be used to log all | Auto Dose Softener | `teddy-bear` | `switch` | `startProgram.autoSoftenerStatus` | | Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` | | Delay Time | `timer-plus` | `number` | `startProgram.delayTime` | +| Dirty level | `liquid-spot` | `select` | `startProgram.dirtyLevel` | | Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | | Extra Rinse 1 | `numeric-1-box-multiple-outline` | `switch` | `startProgram.extraRinse1` | | Extra Rinse 2 | `numeric-2-box-multiple-outline` | `switch` | `startProgram.extraRinse2` | @@ -523,7 +525,7 @@ For every device exists a button under diagnostics which can be used to log all | Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | | Current Temperature | `thermometer` | `sensor` | `temp` | | Current Water Used | `water` | `sensor` | `currentWaterUsed` | -| Dirt level | `liquid-spot` | `sensor` | `dirtyLevel` | +| Dirty level | `liquid-spot` | `sensor` | `dirtyLevel` | | Door | | `binary_sensor` | `doorStatus` | | Door Lock | | `binary_sensor` | `doorLockStatus` | | Error | `math-log` | `sensor` | `errors` | diff --git a/custom_components/hon/select.py b/custom_components/hon/select.py index d0deabf..906b690 100644 --- a/custom_components/hon/select.py +++ b/custom_components/hon/select.py @@ -56,6 +56,13 @@ SELECTS = { translation_key="steam_level", option_list=const.STEAM_LEVEL, ), + HonConfigSelectEntityDescription( + key="startProgram.dirtyLevel", + name="Dirty level", + icon="mdi:liquid-spot", + translation_key="dirt_level", + option_list=const.DIRTY_LEVEL, + ), ), "TD": ( HonConfigSelectEntityDescription( diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index 89e9e47..791f99d 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -157,7 +157,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { ), HonSensorEntityDescription( key="dirtyLevel", - name="Dirt level", + name="Dirty level", icon="mdi:liquid-spot", device_class=SensorDeviceClass.ENUM, translation_key="dirt_level", diff --git a/custom_components/hon/translations/cs.json b/custom_components/hon/translations/cs.json index 6f31cfc..6b20f1c 100644 --- a/custom_components/hon/translations/cs.json +++ b/custom_components/hon/translations/cs.json @@ -1650,6 +1650,15 @@ "synthetic": "Synthetic" }, "name": "Úroveň páry" + }, + "dirt_level": { + "state": { + "little": "Málo", + "normal": "Normální", + "very": "Velmi", + "unknown": "unknown" + }, + "name": "Míra znečištění" } }, "switch": { diff --git a/custom_components/hon/translations/de.json b/custom_components/hon/translations/de.json index ab590b0..addc747 100644 --- a/custom_components/hon/translations/de.json +++ b/custom_components/hon/translations/de.json @@ -1650,6 +1650,15 @@ "synthetic": "Synthetik" }, "name": "Dampfstufe" + }, + "dirt_level": { + "state": { + "little": "Wenig", + "normal": "Normal", + "very": "Sehr", + "unknown": "unknown" + }, + "name": "Verschmutzungsgrad" } }, "switch": { diff --git a/custom_components/hon/translations/el.json b/custom_components/hon/translations/el.json index f65cde0..2976aa6 100644 --- a/custom_components/hon/translations/el.json +++ b/custom_components/hon/translations/el.json @@ -1650,6 +1650,15 @@ "synthetic": "Συνθετικά" }, "name": "Επίπεδο ατμού" + }, + "dirt_level": { + "state": { + "little": "Λίγη", + "normal": "Κανονική", + "very": "Πολύ", + "unknown": "unknown" + }, + "name": "Επίπεδο βρωμιάς" } }, "switch": { diff --git a/custom_components/hon/translations/en.json b/custom_components/hon/translations/en.json index 052c8a9..eb2bb92 100644 --- a/custom_components/hon/translations/en.json +++ b/custom_components/hon/translations/en.json @@ -1677,6 +1677,15 @@ "synthetic": "Synthetic" }, "name": "Steam Level" + }, + "dirt_level": { + "state": { + "little": "Little", + "normal": "Normal", + "very": "Very", + "unknown": "unknown" + }, + "name": "Dirt level" } }, "switch": { diff --git a/custom_components/hon/translations/es.json b/custom_components/hon/translations/es.json index 57548a6..8d4cad9 100644 --- a/custom_components/hon/translations/es.json +++ b/custom_components/hon/translations/es.json @@ -1650,6 +1650,15 @@ "synthetic": "Synthetic" }, "name": "Nivel de vapor" + }, + "dirt_level": { + "state": { + "little": "Poco", + "normal": "Normal", + "very": "Mucho", + "unknown": "unknown" + }, + "name": "Nivel de suciedad" } }, "switch": { diff --git a/custom_components/hon/translations/fr.json b/custom_components/hon/translations/fr.json index e937f35..f97a77a 100644 --- a/custom_components/hon/translations/fr.json +++ b/custom_components/hon/translations/fr.json @@ -1650,6 +1650,15 @@ "synthetic": "Synthetic" }, "name": "Niveau de vapeur" + }, + "dirt_level": { + "state": { + "little": "Faible", + "normal": "Normal", + "very": "Élevé", + "unknown": "unknown" + }, + "name": "Niveau de saleté" } }, "switch": { diff --git a/custom_components/hon/translations/he.json b/custom_components/hon/translations/he.json index 115574a..fb71888 100644 --- a/custom_components/hon/translations/he.json +++ b/custom_components/hon/translations/he.json @@ -771,6 +771,15 @@ "synthetic": "מְלָאכוּתִי" }, "name": "מפלס קיטור" + }, + "dirt_level": { + "state": { + "little": "קטן", + "normal": "נוֹרמָלִי", + "very": "מאוד", + "unknown": "unknown" + }, + "name": "רמת עפר" } }, "switch": { diff --git a/custom_components/hon/translations/hr.json b/custom_components/hon/translations/hr.json index 01cd213..96e38c8 100644 --- a/custom_components/hon/translations/hr.json +++ b/custom_components/hon/translations/hr.json @@ -1650,6 +1650,15 @@ "synthetic": "Sintetika" }, "name": "Razina pare" + }, + "dirt_level": { + "state": { + "little": "Neznatno", + "normal": "Uobičajeno", + "very": "Izuzetno", + "unknown": "unknown" + }, + "name": "Stupanj zaprljanosti" } }, "switch": { diff --git a/custom_components/hon/translations/it.json b/custom_components/hon/translations/it.json index cb9c462..02b9ce0 100644 --- a/custom_components/hon/translations/it.json +++ b/custom_components/hon/translations/it.json @@ -1655,6 +1655,15 @@ "synthetic": "Sintetici" }, "name": "Livello vapore" + }, + "dirt_level": { + "state": { + "little": "Poco", + "normal": "Normale", + "very": "Molto", + "unknown": "unknown" + }, + "name": "Livello di sporco" } }, "switch": { diff --git a/custom_components/hon/translations/nl.json b/custom_components/hon/translations/nl.json index a3ab35b..e82b6ef 100644 --- a/custom_components/hon/translations/nl.json +++ b/custom_components/hon/translations/nl.json @@ -1650,6 +1650,15 @@ "synthetic": "Synthetic" }, "name": "Stoomniveau" + }, + "dirt_level": { + "state": { + "little": "Weinig", + "normal": "Normaal", + "very": "Heel", + "unknown": "unknown" + }, + "name": "Vuilheid" } }, "switch": { diff --git a/custom_components/hon/translations/pl.json b/custom_components/hon/translations/pl.json index 8c8bd49..2259488 100644 --- a/custom_components/hon/translations/pl.json +++ b/custom_components/hon/translations/pl.json @@ -1650,6 +1650,15 @@ "synthetic": "Syntetyczne" }, "name": "Poziom pary" + }, + "dirt_level": { + "state": { + "little": "Niskie", + "normal": "Standardowe", + "very": "Wysokie", + "unknown": "unknown" + }, + "name": "Stopień zabrudzenia" } }, "switch": { diff --git a/custom_components/hon/translations/pt.json b/custom_components/hon/translations/pt.json index 9da78b9..68b3506 100644 --- a/custom_components/hon/translations/pt.json +++ b/custom_components/hon/translations/pt.json @@ -1650,6 +1650,15 @@ "synthetic": "Sintéticos" }, "name": "Nível de vapor" + }, + "dirt_level": { + "state": { + "little": "Pouco", + "normal": "Normal", + "very": "Muito", + "unknown": "unknown" + }, + "name": "Nível de sujidade" } }, "switch": { diff --git a/custom_components/hon/translations/ro.json b/custom_components/hon/translations/ro.json index 7aefe02..ac8bfa1 100644 --- a/custom_components/hon/translations/ro.json +++ b/custom_components/hon/translations/ro.json @@ -1650,6 +1650,15 @@ "synthetic": "Synthetic" }, "name": "Nivel abur" + }, + "dirt_level": { + "state": { + "little": "Puțin", + "normal": "Normal", + "very": "Foarte", + "unknown": "unknown" + }, + "name": "Nivel de murdărie" } }, "switch": { diff --git a/custom_components/hon/translations/ru.json b/custom_components/hon/translations/ru.json index d78cfb6..f6af1fe 100644 --- a/custom_components/hon/translations/ru.json +++ b/custom_components/hon/translations/ru.json @@ -1650,6 +1650,15 @@ "synthetic": "Синтетика" }, "name": "Уровень пара" + }, + "dirt_level": { + "state": { + "little": "Мало", + "normal": "Нормально", + "very": "Очень", + "unknown": "unknown" + }, + "name": "Уровень загрязнения" } }, "switch": { diff --git a/custom_components/hon/translations/sk.json b/custom_components/hon/translations/sk.json index 374d661..f34d855 100644 --- a/custom_components/hon/translations/sk.json +++ b/custom_components/hon/translations/sk.json @@ -1650,6 +1650,15 @@ "synthetic": "Synthetic" }, "name": "Úroveň nastavenia pary" + }, + "dirt_level": { + "state": { + "little": "Málo", + "normal": "Normálne", + "very": "Veľa", + "unknown": "unknown" + }, + "name": "Úroveň znečistenia" } }, "switch": { diff --git a/custom_components/hon/translations/sl.json b/custom_components/hon/translations/sl.json index e7068ad..2d1ea9c 100644 --- a/custom_components/hon/translations/sl.json +++ b/custom_components/hon/translations/sl.json @@ -1650,6 +1650,15 @@ "synthetic": "Sintetika" }, "name": "Količina pare" + }, + "dirt_level": { + "state": { + "little": "Malo", + "normal": "Normalno", + "very": "Zelo", + "unknown": "unknown" + }, + "name": "Stopnja umazanije" } }, "switch": { diff --git a/custom_components/hon/translations/sr.json b/custom_components/hon/translations/sr.json index d3ef545..357f0f4 100644 --- a/custom_components/hon/translations/sr.json +++ b/custom_components/hon/translations/sr.json @@ -1650,6 +1650,15 @@ "synthetic": "Sintetika" }, "name": "Nivo pare" + }, + "dirt_level": { + "state": { + "little": "Malo", + "normal": "Normalno", + "very": "Veoma", + "unknown": "unknown" + }, + "name": "Nivo zaprljanosti" } }, "switch": { diff --git a/custom_components/hon/translations/tr.json b/custom_components/hon/translations/tr.json index c6f8088..30d30b2 100644 --- a/custom_components/hon/translations/tr.json +++ b/custom_components/hon/translations/tr.json @@ -1650,6 +1650,15 @@ "synthetic": "Synthetic" }, "name": "Buhar Seviyesi" + }, + "dirt_level": { + "state": { + "little": "Az", + "normal": "Normal", + "very": "Çok", + "unknown": "unknown" + }, + "name": "Kir seviyesi" } }, "switch": { diff --git a/custom_components/hon/translations/zh.json b/custom_components/hon/translations/zh.json index f9a0a26..1d62115 100644 --- a/custom_components/hon/translations/zh.json +++ b/custom_components/hon/translations/zh.json @@ -1650,6 +1650,15 @@ "synthetic": "Synthetic" }, "name": "蒸汽档位" + }, + "dirt_level": { + "state": { + "little": "少量", + "normal": "正常", + "very": "非常", + "unknown": "unknown" + }, + "name": "脏污程度" } }, "switch": { diff --git a/scripts/translation_keys.py b/scripts/translation_keys.py index 8f29d34..2855a0a 100644 --- a/scripts/translation_keys.py +++ b/scripts/translation_keys.py @@ -129,6 +129,7 @@ SELECT = { "steam_level": STEAM_LEVEL, "mode": AP_MACH_MODE, "diffuser": AP_DIFFUSER_LEVEL, + "dirt_level": DIRTY_LEVEL, } PROGRAMS = { @@ -291,6 +292,7 @@ NAMES = { "diffuser": "AP.TITLES.DIFFUSER", "mode": "CUBE90_GLOBAL.GENERAL.MODE", "steam_level": "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_MAIN_OPTIONS.STEAM_LEVEL", + "dirt_level": "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_MAIN_OPTIONS.DIRTY_LEVEL", }, "sensor": { "dry_levels": "WASHING_CMD&CTRL.DRAWER_CYCLE_DRYING.TAB_LEVEL",