From f3325f0ff559ccbce24b321c277314b2d14c1411 Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Wed, 12 Jul 2023 00:18:44 +0200 Subject: [PATCH] Improve icons/translations of air purifier #72 --- README.md | 10 +++++----- custom_components/hon/select.py | 2 +- custom_components/hon/sensor.py | 13 ++++++++++++- custom_components/hon/translations/cs.json | 12 ++++++++++++ custom_components/hon/translations/de.json | 12 ++++++++++++ custom_components/hon/translations/el.json | 12 ++++++++++++ custom_components/hon/translations/en.json | 12 ++++++++++++ custom_components/hon/translations/es.json | 12 ++++++++++++ custom_components/hon/translations/fr.json | 12 ++++++++++++ custom_components/hon/translations/he.json | 12 ++++++++++++ custom_components/hon/translations/hr.json | 12 ++++++++++++ custom_components/hon/translations/it.json | 12 ++++++++++++ custom_components/hon/translations/nl.json | 12 ++++++++++++ custom_components/hon/translations/pl.json | 12 ++++++++++++ custom_components/hon/translations/pt.json | 12 ++++++++++++ custom_components/hon/translations/ro.json | 12 ++++++++++++ custom_components/hon/translations/ru.json | 12 ++++++++++++ custom_components/hon/translations/sk.json | 12 ++++++++++++ custom_components/hon/translations/sl.json | 12 ++++++++++++ custom_components/hon/translations/sr.json | 12 ++++++++++++ custom_components/hon/translations/tr.json | 12 ++++++++++++ custom_components/hon/translations/zh.json | 12 ++++++++++++ scripts/translation_keys.py | 4 ++++ 23 files changed, 250 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fa3993e..6021225 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ For every device exists a button under diagnostics which can be used to log all | --- | --- | --- | --- | | Aroma Time Off | `scent-off` | `number` | `settings.aromaTimeOff` | | Aroma Time On | `scent` | `number` | `settings.aromaTimeOn` | -| Diffuser Level | `air-filter` | `select` | `settings.aromaStatus` | +| Diffuser Level | `air-purifier` | `select` | `settings.aromaStatus` | | Light status | | `light` | `settings.lightStatus` | | Lock Status | | `lock` | `lockStatus` | | Mode | `play` | `select` | `settings.machMode` | @@ -190,19 +190,19 @@ For every device exists a button under diagnostics which can be used to log all #### Sensors | Name | Icon | Entity | Key | | --- | --- | --- | --- | -| Air Quality | | `sensor` | `airQuality` | +| Air Quality | `weather-dust` | `sensor` | `airQuality` | | CO Level | | `sensor` | `coLevel` | | Error | `math-log` | `sensor` | `errors` | | Humidity | | `sensor` | `humidityIndoor` | -| Main Filter Status | | `sensor` | `mainFilterStatus` | +| Main Filter Status | `air-filter` | `sensor` | `mainFilterStatus` | | On | `power-cycle` | `binary_sensor` | `attributes.parameters.onOffStatus` | | PM 10 | | `sensor` | `pm10ValueIndoor` | | PM 2.5 | | `sensor` | `pm2p5ValueIndoor` | -| Pre Filter Status | | `sensor` | `preFilterStatus` | +| Pre Filter Status | `air-filter` | `sensor` | `preFilterStatus` | | Temperature | | `sensor` | `temp` | | Total Work Time | | `sensor` | `totalWorkTime` | | VOC | | `sensor` | `vocValueIndoor` | -| Wind Speed | | `sensor` | `windSpeed` | +| Wind Speed | `fan` | `sensor` | `windSpeed` | ### Dish Washer #### Controls diff --git a/custom_components/hon/select.py b/custom_components/hon/select.py index 906b690..130480f 100644 --- a/custom_components/hon/select.py +++ b/custom_components/hon/select.py @@ -153,7 +153,7 @@ SELECTS = { name="Diffuser Level", option_list=const.AP_DIFFUSER_LEVEL, translation_key="diffuser", - icon="mdi:air-filter", + icon="mdi:air-purifier", ), HonSelectEntityDescription( key="settings.machMode", diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index 791f99d..5994d95 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -688,11 +688,15 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { HonSensorEntityDescription( key="mainFilterStatus", name="Main Filter Status", + icon="mdi:air-filter", + translation_key="filter_life", native_unit_of_measurement=PERCENTAGE, ), HonSensorEntityDescription( key="preFilterStatus", name="Pre Filter Status", + icon="mdi:air-filter", + translation_key="filter_cleaning", native_unit_of_measurement=PERCENTAGE, ), HonSensorEntityDescription( @@ -746,10 +750,17 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { native_unit_of_measurement=UnitOfTemperature.CELSIUS, translation_key="temperature", ), - HonSensorEntityDescription(key="windSpeed", name="Wind Speed"), + HonSensorEntityDescription( + key="windSpeed", + name="Wind Speed", + icon="mdi:fan", + translation_key="fan_speed", + ), HonSensorEntityDescription( key="airQuality", name="Air Quality", + icon="mdi:weather-dust", + translation_key="air_quality", ), ), } diff --git a/custom_components/hon/translations/cs.json b/custom_components/hon/translations/cs.json index 7540f0c..84a2f6f 100644 --- a/custom_components/hon/translations/cs.json +++ b/custom_components/hon/translations/cs.json @@ -875,6 +875,18 @@ "synthetic": "Synthetic" }, "name": "Úroveň páry" + }, + "filter_cleaning": { + "name": "Čištění filtru" + }, + "filter_life": { + "name": "Životnost filtru" + }, + "air_quality": { + "name": "Kvalita vzduchu" + }, + "fan_speed": { + "name": "Rychlost ventilátoru" } }, "select": { diff --git a/custom_components/hon/translations/de.json b/custom_components/hon/translations/de.json index 1d90d63..3cdbb5e 100644 --- a/custom_components/hon/translations/de.json +++ b/custom_components/hon/translations/de.json @@ -875,6 +875,18 @@ "synthetic": "Synthetik" }, "name": "Dampfstufe" + }, + "filter_cleaning": { + "name": "Reinigung der Filter" + }, + "filter_life": { + "name": "Filterlebensdauer" + }, + "air_quality": { + "name": "Luftqualität" + }, + "fan_speed": { + "name": "Gebläsegeschwindigkeit" } }, "select": { diff --git a/custom_components/hon/translations/el.json b/custom_components/hon/translations/el.json index 93fe842..637dfc1 100644 --- a/custom_components/hon/translations/el.json +++ b/custom_components/hon/translations/el.json @@ -875,6 +875,18 @@ "synthetic": "Συνθετικά" }, "name": "Επίπεδο ατμού" + }, + "filter_cleaning": { + "name": "Καθαρισμός φίλτρου" + }, + "filter_life": { + "name": "Φιλτράρετε τη ζωή" + }, + "air_quality": { + "name": "Ποιότητα αέρα" + }, + "fan_speed": { + "name": "Ταχύτητα ανεμιστήρα" } }, "select": { diff --git a/custom_components/hon/translations/en.json b/custom_components/hon/translations/en.json index 88f2fe9..79e3137 100644 --- a/custom_components/hon/translations/en.json +++ b/custom_components/hon/translations/en.json @@ -895,6 +895,18 @@ "synthetic": "Synthetic" }, "name": "Steam Level" + }, + "filter_cleaning": { + "name": "Filter cleaning" + }, + "filter_life": { + "name": "Filter life" + }, + "air_quality": { + "name": "Air Quality" + }, + "fan_speed": { + "name": "Fan speed" } }, "select": { diff --git a/custom_components/hon/translations/es.json b/custom_components/hon/translations/es.json index 5bef66e..7c6efe7 100644 --- a/custom_components/hon/translations/es.json +++ b/custom_components/hon/translations/es.json @@ -875,6 +875,18 @@ "synthetic": "Synthetic" }, "name": "Nivel de vapor" + }, + "filter_cleaning": { + "name": "Limpieza del filtro" + }, + "filter_life": { + "name": "Vida del filtro" + }, + "air_quality": { + "name": "Calidad del aire" + }, + "fan_speed": { + "name": "Velocidad del ventilador" } }, "select": { diff --git a/custom_components/hon/translations/fr.json b/custom_components/hon/translations/fr.json index ecafc19..cab5c7b 100644 --- a/custom_components/hon/translations/fr.json +++ b/custom_components/hon/translations/fr.json @@ -875,6 +875,18 @@ "synthetic": "Synthetic" }, "name": "Niveau de vapeur" + }, + "filter_cleaning": { + "name": "Nettoyage du filtre" + }, + "filter_life": { + "name": "Durée de vie du filtre" + }, + "air_quality": { + "name": "Qualité d’air" + }, + "fan_speed": { + "name": "Vitesse du ventilateur" } }, "select": { diff --git a/custom_components/hon/translations/he.json b/custom_components/hon/translations/he.json index e9bbdde..5c1c6b6 100644 --- a/custom_components/hon/translations/he.json +++ b/custom_components/hon/translations/he.json @@ -431,6 +431,18 @@ "synthetic": "מְלָאכוּתִי" }, "name": "מפלס קיטור" + }, + "filter_cleaning": { + "name": "Filter cleaning" + }, + "filter_life": { + "name": "Filter life" + }, + "air_quality": { + "name": "Air Quality" + }, + "fan_speed": { + "name": "Fan speed" } }, "select": { diff --git a/custom_components/hon/translations/hr.json b/custom_components/hon/translations/hr.json index 277a235..daab723 100644 --- a/custom_components/hon/translations/hr.json +++ b/custom_components/hon/translations/hr.json @@ -875,6 +875,18 @@ "synthetic": "Sintetika" }, "name": "Razina pare" + }, + "filter_cleaning": { + "name": "Čišćenje filtra" + }, + "filter_life": { + "name": "Radni vijek filtra" + }, + "air_quality": { + "name": "Kvaliteta zraka" + }, + "fan_speed": { + "name": "Brzina ventilatora" } }, "select": { diff --git a/custom_components/hon/translations/it.json b/custom_components/hon/translations/it.json index 75e3098..dd88f3b 100644 --- a/custom_components/hon/translations/it.json +++ b/custom_components/hon/translations/it.json @@ -880,6 +880,18 @@ "synthetic": "Sintetici" }, "name": "Livello vapore" + }, + "filter_cleaning": { + "name": "Pulizia del filtro" + }, + "filter_life": { + "name": "Durata filtro" + }, + "air_quality": { + "name": "Qualità dell'Aria" + }, + "fan_speed": { + "name": "Velocità ventole" } }, "select": { diff --git a/custom_components/hon/translations/nl.json b/custom_components/hon/translations/nl.json index 9dd4271..de3333e 100644 --- a/custom_components/hon/translations/nl.json +++ b/custom_components/hon/translations/nl.json @@ -875,6 +875,18 @@ "synthetic": "Synthetic" }, "name": "Stoomniveau" + }, + "filter_cleaning": { + "name": "Filterreiniging" + }, + "filter_life": { + "name": "Levensduur filter" + }, + "air_quality": { + "name": "Luchtkwaliteit" + }, + "fan_speed": { + "name": "Ventilatorsnelheid" } }, "select": { diff --git a/custom_components/hon/translations/pl.json b/custom_components/hon/translations/pl.json index b742691..fcf3b07 100644 --- a/custom_components/hon/translations/pl.json +++ b/custom_components/hon/translations/pl.json @@ -875,6 +875,18 @@ "synthetic": "Syntetyczne" }, "name": "Poziom pary" + }, + "filter_cleaning": { + "name": "Czyszczenie filtra" + }, + "filter_life": { + "name": "Żywotność filtra" + }, + "air_quality": { + "name": "Jakość powietrza" + }, + "fan_speed": { + "name": "Prędkość wentylatora" } }, "select": { diff --git a/custom_components/hon/translations/pt.json b/custom_components/hon/translations/pt.json index 4cf49c1..5a82001 100644 --- a/custom_components/hon/translations/pt.json +++ b/custom_components/hon/translations/pt.json @@ -875,6 +875,18 @@ "synthetic": "Sintéticos" }, "name": "Nível de vapor" + }, + "filter_cleaning": { + "name": "Limpeza do filtro" + }, + "filter_life": { + "name": "Vida do filtro" + }, + "air_quality": { + "name": "Qualidade do ar" + }, + "fan_speed": { + "name": "Velocidade da bomba" } }, "select": { diff --git a/custom_components/hon/translations/ro.json b/custom_components/hon/translations/ro.json index c0a1c0e..7bd066c 100644 --- a/custom_components/hon/translations/ro.json +++ b/custom_components/hon/translations/ro.json @@ -875,6 +875,18 @@ "synthetic": "Synthetic" }, "name": "Nivel abur" + }, + "filter_cleaning": { + "name": "Curățarea filtrului" + }, + "filter_life": { + "name": "Viața filtrului" + }, + "air_quality": { + "name": "Calitatea aerului" + }, + "fan_speed": { + "name": "Viteza ventilatorului" } }, "select": { diff --git a/custom_components/hon/translations/ru.json b/custom_components/hon/translations/ru.json index 7268daa..177a326 100644 --- a/custom_components/hon/translations/ru.json +++ b/custom_components/hon/translations/ru.json @@ -875,6 +875,18 @@ "synthetic": "Синтетика" }, "name": "Уровень пара" + }, + "filter_cleaning": { + "name": "Чистка фильтра" + }, + "filter_life": { + "name": "Срок службы фильтра" + }, + "air_quality": { + "name": "Качество воздуха" + }, + "fan_speed": { + "name": "Скорость вентилятора" } }, "select": { diff --git a/custom_components/hon/translations/sk.json b/custom_components/hon/translations/sk.json index f6bb734..ba178c1 100644 --- a/custom_components/hon/translations/sk.json +++ b/custom_components/hon/translations/sk.json @@ -875,6 +875,18 @@ "synthetic": "Synthetic" }, "name": "Úroveň nastavenia pary" + }, + "filter_cleaning": { + "name": "Čistenie filtra" + }, + "filter_life": { + "name": "Životnosť filtra" + }, + "air_quality": { + "name": "Kvalita vzduchu" + }, + "fan_speed": { + "name": "Rýchlosť ventilátora" } }, "select": { diff --git a/custom_components/hon/translations/sl.json b/custom_components/hon/translations/sl.json index 9b50292..419fd0d 100644 --- a/custom_components/hon/translations/sl.json +++ b/custom_components/hon/translations/sl.json @@ -875,6 +875,18 @@ "synthetic": "Sintetika" }, "name": "Količina pare" + }, + "filter_cleaning": { + "name": "Čiščenje filtra" + }, + "filter_life": { + "name": "Življenjska doba filtra" + }, + "air_quality": { + "name": "Kakovost zraka" + }, + "fan_speed": { + "name": "Hitrost ventilatorja" } }, "select": { diff --git a/custom_components/hon/translations/sr.json b/custom_components/hon/translations/sr.json index 61e12aa..152af7c 100644 --- a/custom_components/hon/translations/sr.json +++ b/custom_components/hon/translations/sr.json @@ -875,6 +875,18 @@ "synthetic": "Sintetika" }, "name": "Nivo pare" + }, + "filter_cleaning": { + "name": "Čišćenje filtera" + }, + "filter_life": { + "name": "Trajanje filtera" + }, + "air_quality": { + "name": "Kvalitet vazduha" + }, + "fan_speed": { + "name": "Brzina ventilatora" } }, "select": { diff --git a/custom_components/hon/translations/tr.json b/custom_components/hon/translations/tr.json index 4880fb9..b469240 100644 --- a/custom_components/hon/translations/tr.json +++ b/custom_components/hon/translations/tr.json @@ -875,6 +875,18 @@ "synthetic": "Synthetic" }, "name": "Buhar Seviyesi" + }, + "filter_cleaning": { + "name": "Filtre temizliği" + }, + "filter_life": { + "name": "Filtre ömrü" + }, + "air_quality": { + "name": "Hava kalitesi" + }, + "fan_speed": { + "name": "Fan hızı" } }, "select": { diff --git a/custom_components/hon/translations/zh.json b/custom_components/hon/translations/zh.json index 684d7a5..eefa1fe 100644 --- a/custom_components/hon/translations/zh.json +++ b/custom_components/hon/translations/zh.json @@ -875,6 +875,18 @@ "synthetic": "Synthetic" }, "name": "蒸汽档位" + }, + "filter_cleaning": { + "name": "滤网清洁" + }, + "filter_life": { + "name": "过滤器寿命" + }, + "air_quality": { + "name": "空气质量" + }, + "fan_speed": { + "name": "风扇速度" } }, "select": { diff --git a/scripts/translation_keys.py b/scripts/translation_keys.py index a427cb6..dff1c4d 100644 --- a/scripts/translation_keys.py +++ b/scripts/translation_keys.py @@ -350,6 +350,10 @@ NAMES = { "programs_ac": "WC.SET_PROGRAM.PROGRAM", "programs_ref": "WC.SET_PROGRAM.PROGRAM", "voc": "HINTS.WHAT_POLLUTES_THE_AIR_IN_OUR_HOMES.GAS_VOC_TITLE", + "filter_cleaning": "AP.MAINTENANCE.FILTER_CLEANING", + "filter_life": "AP.MAINTENANCE.FILTER_LIFE", + "air_quality": "AP.DISCOVER.AIR_QUALITY", + "fan_speed": "AP.TITLES.FAN_SPEED", }, "number": { "power_management": "HINTS.COOKING_WITH_INDUCTION.POWER_MANAGEMENT",