Improve translation of dryer level

This commit is contained in:
Andre Basche 2023-04-22 23:09:57 +02:00
parent 2c93b86dfe
commit 13a23eb6e1
24 changed files with 552 additions and 57 deletions

View File

@ -46,13 +46,6 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
entity_category=EntityCategory.CONFIG, entity_category=EntityCategory.CONFIG,
native_unit_of_measurement=UnitOfTime.MINUTES, native_unit_of_measurement=UnitOfTime.MINUTES,
), ),
NumberEntityDescription(
key="startProgram.dryLevel",
name="Dry level",
entity_category=EntityCategory.CONFIG,
icon="mdi:hair-dryer",
translation_key="tumbledryerdrylevel",
),
NumberEntityDescription( NumberEntityDescription(
key="startProgram.tempLevel", key="startProgram.tempLevel",
name="Temperature level", name="Temperature level",

View File

@ -54,6 +54,13 @@ SELECTS = {
icon="mdi:timer", icon="mdi:timer",
unit_of_measurement=UnitOfTime.MINUTES, unit_of_measurement=UnitOfTime.MINUTES,
), ),
SelectEntityDescription(
key="startProgram.dryLevel",
name="Dry level",
entity_category=EntityCategory.CONFIG,
icon="mdi:hair-dryer",
translation_key="dry_levels",
),
), ),
"WD": ( "WD": (
SelectEntityDescription( SelectEntityDescription(
@ -130,10 +137,10 @@ class HonSelectEntity(HonEntity, SelectEntity):
@property @property
def current_option(self) -> str | None: def current_option(self) -> str | None:
value = self._device.settings[self.entity_description.key].value value = self._device.settings.get(self.entity_description.key)
if value is None or value not in self._attr_options: if value is None or value.value not in self._attr_options:
return None return None
return value return value.value
async def async_select_option(self, option: str) -> None: async def async_select_option(self, option: str) -> None:
self._device.settings[self.entity_description.key].value = option self._device.settings[self.entity_description.key].value = option
@ -141,12 +148,13 @@ class HonSelectEntity(HonEntity, SelectEntity):
@callback @callback
def _handle_coordinator_update(self): def _handle_coordinator_update(self):
setting = self._device.settings[self.entity_description.key] setting = self._device.settings.get(self.entity_description.key)
if not isinstance( if setting is None:
self._device.settings[self.entity_description.key], HonParameterFixed self._attr_available = False
): self._attr_options: list[str] = []
self._attr_options: list[str] = setting.values self._attr_native_value = None
else: else:
self._attr_options = [setting.value] self._attr_available = True
self._attr_native_value = setting.value self._attr_options: list[str] = setting.values
self._attr_native_value = setting.value
self.async_write_ha_state() self.async_write_ha_state()

View File

@ -142,7 +142,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
key="dryLevel", key="dryLevel",
name="Dry level", name="Dry level",
icon="mdi:hair-dryer", icon="mdi:hair-dryer",
translation_key="tumbledryerdrylevel", translation_key="dry_levels",
), ),
SensorEntityDescription( SensorEntityDescription(
key="tempLevel", key="tempLevel",

View File

@ -49,7 +49,7 @@
"103": "Отдалечен" "103": "Отдалечен"
} }
}, },
"tumbledryerprogramphase": { "program_phases_td": {
"state": { "state": {
"0": "Изчаване", "0": "Изчаване",
"2": "Сушене", "2": "Сушене",
@ -65,7 +65,17 @@
"4": "Висока температура L-3" "4": "Висока температура L-3"
} }
}, },
"tumbledryerdrylevel": { "dry_levels": {
"state": {
"3": "Готови за съхранение",
"12": "Готови за гладене H-1",
"13": "Готови за съхранение H-2",
"14": "Екстра сухо H-3"
}
}
},
"select": {
"dry_levels": {
"state": { "state": {
"3": "Готови за съхранение", "3": "Готови за съхранение",
"12": "Готови за гладене H-1", "12": "Готови за гладене H-1",

View File

@ -65,6 +65,19 @@
"5": "P\u0159ipraveno", "5": "P\u0159ipraveno",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Bez su\u0161en\u00ed",
"1": "\u017dehlen\u00ed",
"2": "Do sk\u0159\u00edn\u011b",
"3": "Do sk\u0159\u00edn\u011b",
"4": "Extra such\u00e9",
"12": "\u017dehlen\u00ed",
"13": "Do sk\u0159\u00edn\u011b",
"14": "P\u0159ipraveno k oble\u010den\u00ed",
"15": "Extra such\u00e9"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Vlna - such\u00e9", "wool_dry": "Vlna - such\u00e9",
"wool_soft_care": "Vlna & M\u0115kk\u00e1 P\u00e9\u010de" "wool_soft_care": "Vlna & M\u0115kk\u00e1 P\u00e9\u010de"
} }
},
"dry_levels": {
"state": {
"0": "Bez su\u0161en\u00ed",
"1": "\u017dehlen\u00ed",
"2": "Do sk\u0159\u00edn\u011b",
"3": "Do sk\u0159\u00edn\u011b",
"4": "Extra such\u00e9",
"12": "\u017dehlen\u00ed",
"13": "Do sk\u0159\u00edn\u011b",
"14": "P\u0159ipraveno k oble\u010den\u00ed",
"15": "Extra such\u00e9"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Bereit", "5": "Bereit",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Keine Trocknung",
"1": "B\u00fcgeln",
"2": "W\u00e4sche fertig",
"3": "W\u00e4sche fertig",
"4": "Extra trocken",
"12": "B\u00fcgeln",
"13": "W\u00e4sche fertig",
"14": "Bereit zum Anziehen",
"15": "Extra trocken"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Wolle trocknen", "wool_dry": "Wolle trocknen",
"wool_soft_care": "Wolle & Soft Care" "wool_soft_care": "Wolle & Soft Care"
} }
},
"dry_levels": {
"state": {
"0": "Keine Trocknung",
"1": "B\u00fcgeln",
"2": "W\u00e4sche fertig",
"3": "W\u00e4sche fertig",
"4": "Extra trocken",
"12": "B\u00fcgeln",
"13": "W\u00e4sche fertig",
"14": "Bereit zum Anziehen",
"15": "Extra trocken"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "\u0395\u03c4\u03bf\u03b9\u03bc\u03bf\u03c2", "5": "\u0395\u03c4\u03bf\u03b9\u03bc\u03bf\u03c2",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "\u03a7\u03c9\u03c1\u03af\u03c2 \u03c3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1",
"1": "\u03a3\u03b9\u03b4\u03ad\u03c1\u03c9\u03bc\u03b1",
"2": "\u03a3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1 \u03b3\u03b9\u03b1 \u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 ",
"3": "\u03a3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1 \u03b3\u03b9\u03b1 \u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 ",
"4": "\u0395\u03c0\u03b9\u03c0\u03bb\u03ad\u03bf\u03bd \u03c3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1",
"12": "\u03a3\u03b9\u03b4\u03ad\u03c1\u03c9\u03bc\u03b1",
"13": "\u03a3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1 \u03b3\u03b9\u03b1 \u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 ",
"14": "\u0395\u03c4\u03bf\u03b9\u03bc\u03bf \u03bd\u03b1 \u03c6\u03bf\u03c1\u03b5\u03b8\u03b5\u03af",
"15": "\u0395\u03c0\u03b9\u03c0\u03bb\u03ad\u03bf\u03bd \u03c3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "\u039c\u03ac\u03bb\u03bb\u03b9\u03bd\u03b1 \u03c3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1", "wool_dry": "\u039c\u03ac\u03bb\u03bb\u03b9\u03bd\u03b1 \u03c3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1",
"wool_soft_care": "\u03bc\u03b1\u03bb\u03bb\u03b9\u03bd\u03b1 & Soft Care" "wool_soft_care": "\u03bc\u03b1\u03bb\u03bb\u03b9\u03bd\u03b1 & Soft Care"
} }
},
"dry_levels": {
"state": {
"0": "\u03a7\u03c9\u03c1\u03af\u03c2 \u03c3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1",
"1": "\u03a3\u03b9\u03b4\u03ad\u03c1\u03c9\u03bc\u03b1",
"2": "\u03a3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1 \u03b3\u03b9\u03b1 \u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 ",
"3": "\u03a3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1 \u03b3\u03b9\u03b1 \u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 ",
"4": "\u0395\u03c0\u03b9\u03c0\u03bb\u03ad\u03bf\u03bd \u03c3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1",
"12": "\u03a3\u03b9\u03b4\u03ad\u03c1\u03c9\u03bc\u03b1",
"13": "\u03a3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1 \u03b3\u03b9\u03b1 \u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 ",
"14": "\u0395\u03c4\u03bf\u03b9\u03bc\u03bf \u03bd\u03b1 \u03c6\u03bf\u03c1\u03b5\u03b8\u03b5\u03af",
"15": "\u0395\u03c0\u03b9\u03c0\u03bb\u03ad\u03bf\u03bd \u03c3\u03c4\u03ad\u03b3\u03bd\u03c9\u03bc\u03b1"
}
} }
} }
} }

View File

@ -49,14 +49,7 @@
"103": "Remote" "103": "Remote"
} }
}, },
"tumbledryerprogramphase": {
"state": {
"0": "Waiting",
"2": "Drying",
"3": "Cooldown",
"11": "11"
}
},
"tumbledryertemplevel": { "tumbledryertemplevel": {
"state": { "state": {
"1": "Cool", "1": "Cool",
@ -65,14 +58,6 @@
"4": "High temperature L-3" "4": "High temperature L-3"
} }
}, },
"tumbledryerdrylevel": {
"state": {
"3": "Cupboard dry",
"12": "Ready to Iron H-1",
"13": "Ready to Store H-2",
"14": "Extra Dry H-3"
}
},
"mode_dw": { "mode_dw": {
"state": { "state": {
"0": "Disconnected", "0": "Disconnected",
@ -147,9 +132,35 @@
"5": "Ready", "5": "Ready",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "No drying",
"1": "Iron dry",
"2": "Hang",
"3": "Cupboard Dry",
"4": "Extra dry",
"12": "Iron dry",
"13": "Cupboard Dry",
"14": "Ready to wear",
"15": "Extra dry"
}
} }
}, },
"select": { "select": {
"dry_levels": {
"state": {
"0": "No drying",
"1": "Iron dry",
"2": "Hang",
"3": "Cupboard Dry",
"4": "Extra dry",
"12": "Iron dry",
"13": "Cupboard Dry",
"14": "Ready to wear",
"15": "Extra dry"
}
},
"programs_dw": { "programs_dw": {
"state": { "state": {
"59_min": "Rapid 59'", "59_min": "Rapid 59'",

View File

@ -65,6 +65,19 @@
"5": "Listo", "5": "Listo",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Sin secado",
"1": "Planchar",
"2": "Listo para guardar",
"3": "Listo para guardar",
"4": "Extraseco",
"12": "Planchar",
"13": "Listo para guardar",
"14": "Listo para llevar",
"15": "Extraseco"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Secado lana", "wool_dry": "Secado lana",
"wool_soft_care": "Lana & Soft Care" "wool_soft_care": "Lana & Soft Care"
} }
},
"dry_levels": {
"state": {
"0": "Sin secado",
"1": "Planchar",
"2": "Listo para guardar",
"3": "Listo para guardar",
"4": "Extraseco",
"12": "Planchar",
"13": "Listo para guardar",
"14": "Listo para llevar",
"15": "Extraseco"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Pr\u00eat", "5": "Pr\u00eat",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Pas de s\u00e9chage",
"1": "Fer",
"2": "Pr\u00eat \u00e0 ranger",
"3": "Pr\u00eat \u00e0 ranger",
"4": "Extra sec",
"12": "Fer",
"13": "Pr\u00eat \u00e0 ranger",
"14": "Pr\u00eat \u00e0 porter",
"15": "Extra sec"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "S\u00e9chage de la laine", "wool_dry": "S\u00e9chage de la laine",
"wool_soft_care": "Laine & Soin Doux" "wool_soft_care": "Laine & Soin Doux"
} }
},
"dry_levels": {
"state": {
"0": "Pas de s\u00e9chage",
"1": "Fer",
"2": "Pr\u00eat \u00e0 ranger",
"3": "Pr\u00eat \u00e0 ranger",
"4": "Extra sec",
"12": "Fer",
"13": "Pr\u00eat \u00e0 ranger",
"14": "Pr\u00eat \u00e0 porter",
"15": "Extra sec"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "\u05de\u05d5\u05bc\u05db\u05b8\u05df", "5": "\u05de\u05d5\u05bc\u05db\u05b8\u05df",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "\u05dc\u05dc\u05d0 \u05d9\u05d9\u05d1\u05d5\u05e9",
"1": "\u05d1\u05bc\u05b7\u05e8\u05d6\u05b6\u05dc",
"2": "\u05dc\u05d0 \u05dc\u05d9\u05d9\u05d1\u05e9 \u05d1\u05e8\u05d6\u05dc",
"3": "\u05d0\u05e8\u05d5\u05df \u05d9\u05d1\u05e9",
"4": "\u05d9\u05d1\u05e9 \u05d1\u05de\u05d9\u05d5\u05d7\u05d3",
"12": "\u05d1\u05bc\u05b7\u05e8\u05d6\u05b6\u05dc",
"13": "\u05d0\u05e8\u05d5\u05df \u05d9\u05d1\u05e9",
"14": "Ready to wear",
"15": "\u05d9\u05d1\u05e9 \u05d1\u05de\u05d9\u05d5\u05d7\u05d3"
}
} }
}, },
"select": { "select": {
@ -303,6 +316,19 @@
"wool_dry": "\u05e6\u05de\u05e8 \u05d9\u05d1\u05e9", "wool_dry": "\u05e6\u05de\u05e8 \u05d9\u05d1\u05e9",
"wool_soft_care": "Wool & Soft Care" "wool_soft_care": "Wool & Soft Care"
} }
},
"dry_levels": {
"state": {
"0": "\u05dc\u05dc\u05d0 \u05d9\u05d9\u05d1\u05d5\u05e9",
"1": "\u05d1\u05bc\u05b7\u05e8\u05d6\u05b6\u05dc",
"2": "\u05dc\u05d0 \u05dc\u05d9\u05d9\u05d1\u05e9 \u05d1\u05e8\u05d6\u05dc",
"3": "\u05d0\u05e8\u05d5\u05df \u05d9\u05d1\u05e9",
"4": "\u05d9\u05d1\u05e9 \u05d1\u05de\u05d9\u05d5\u05d7\u05d3",
"12": "\u05d1\u05bc\u05b7\u05e8\u05d6\u05b6\u05dc",
"13": "\u05d0\u05e8\u05d5\u05df \u05d9\u05d1\u05e9",
"14": "Ready to wear",
"15": "\u05d9\u05d1\u05e9 \u05d1\u05de\u05d9\u05d5\u05d7\u05d3"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Spremno", "5": "Spremno",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Bez su\u0161enja",
"1": "Suho za gla\u010danje",
"2": "Suho za spremanje",
"3": "Suho za spremanje",
"4": "Potpuno suho",
"12": "Suho za gla\u010danje",
"13": "Suho za spremanje",
"14": "Spremno za no\u0161enje",
"15": "Potpuno suho"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Suha vuna", "wool_dry": "Suha vuna",
"wool_soft_care": "Vuna & Mekana Njega" "wool_soft_care": "Vuna & Mekana Njega"
} }
},
"dry_levels": {
"state": {
"0": "Bez su\u0161enja",
"1": "Suho za gla\u010danje",
"2": "Suho za spremanje",
"3": "Suho za spremanje",
"4": "Potpuno suho",
"12": "Suho za gla\u010danje",
"13": "Suho za spremanje",
"14": "Spremno za no\u0161enje",
"15": "Potpuno suho"
}
} }
} }
} }

View File

@ -49,14 +49,6 @@
"103": "Controllo Remoto" "103": "Controllo Remoto"
} }
}, },
"tumbledryerprogramphase": {
"state": {
"0": "In Attesa",
"2": "Asciugatura",
"3": "Raffreddamento",
"11": "11"
}
},
"tumbledryertemplevel": { "tumbledryertemplevel": {
"state": { "state": {
"1": "Freddo", "1": "Freddo",
@ -65,14 +57,6 @@
"4": "Alta temperature L-3" "4": "Alta temperature L-3"
} }
}, },
"tumbledryerdrylevel": {
"state": {
"3": "Armadio",
"12": "Pronto Stiro",
"13": "Pronto Armadio",
"14": "Extra Dry H-3"
}
},
"washing_modes": { "washing_modes": {
"state": { "state": {
"0": "Pronta", "0": "Pronta",
@ -137,6 +121,19 @@
"5": "Pronta", "5": "Pronta",
"6": "Risciacquo caldo " "6": "Risciacquo caldo "
} }
},
"dry_levels": {
"state": {
"0": "Nessuna asciugatura",
"1": "Stiro facile",
"2": "Appendere",
"3": "Armadio",
"4": "Extra asciutto",
"12": "Stiro facile",
"13": "Armadio",
"14": "Pronto da indossare",
"15": "Extra asciutto"
}
} }
}, },
"select": { "select": {
@ -777,6 +774,19 @@
"wool_dry": "Asciugatura Lana", "wool_dry": "Asciugatura Lana",
"wool_soft_care": "Lana e Soft Care" "wool_soft_care": "Lana e Soft Care"
} }
},
"dry_levels": {
"state": {
"0": "Nessuna asciugatura",
"1": "Stiro facile",
"2": "Appendere",
"3": "Armadio",
"4": "Extra asciutto",
"12": "Stiro facile",
"13": "Armadio",
"14": "Pronto da indossare",
"15": "Extra asciutto"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Klaar", "5": "Klaar",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Niet drogen",
"1": "Strijken",
"2": "Kastdroog",
"3": "Kastdroog",
"4": "Extra droog",
"12": "Strijken",
"13": "Kastdroog",
"14": "Klaar om te dragen",
"15": "Extra droog"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Wol drogen", "wool_dry": "Wol drogen",
"wool_soft_care": "Wol & Soft Care" "wool_soft_care": "Wol & Soft Care"
} }
},
"dry_levels": {
"state": {
"0": "Niet drogen",
"1": "Strijken",
"2": "Kastdroog",
"3": "Kastdroog",
"4": "Extra droog",
"12": "Strijken",
"13": "Kastdroog",
"14": "Klaar om te dragen",
"15": "Extra droog"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Gotowe", "5": "Gotowe",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Bez suszenia",
"1": "Prasowanie",
"2": "Gotowe do garderoby",
"3": "Gotowe do garderoby",
"4": "Ekstra suchy",
"12": "Prasowanie",
"13": "Gotowe do garderoby",
"14": "Gotowe do w\u0142o\u017cenia",
"15": "Ekstra suchy"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Suszenie we\u0142ny", "wool_dry": "Suszenie we\u0142ny",
"wool_soft_care": "We\u0142na & Soft Care" "wool_soft_care": "We\u0142na & Soft Care"
} }
},
"dry_levels": {
"state": {
"0": "Bez suszenia",
"1": "Prasowanie",
"2": "Gotowe do garderoby",
"3": "Gotowe do garderoby",
"4": "Ekstra suchy",
"12": "Prasowanie",
"13": "Gotowe do garderoby",
"14": "Gotowe do w\u0142o\u017cenia",
"15": "Ekstra suchy"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Pronto", "5": "Pronto",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Sem secagem",
"1": "Engomar",
"2": "Guarda-Roupa pronto",
"3": "Guarda-Roupa pronto",
"4": "Extra seco",
"12": "Engomar",
"13": "Guarda-Roupa pronto",
"14": "Pronto a usar",
"15": "Extra seco"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Secagem de l\u00e3s", "wool_dry": "Secagem de l\u00e3s",
"wool_soft_care": "L\u00e3s & Cuidado Suavidade" "wool_soft_care": "L\u00e3s & Cuidado Suavidade"
} }
},
"dry_levels": {
"state": {
"0": "Sem secagem",
"1": "Engomar",
"2": "Guarda-Roupa pronto",
"3": "Guarda-Roupa pronto",
"4": "Extra seco",
"12": "Engomar",
"13": "Guarda-Roupa pronto",
"14": "Pronto a usar",
"15": "Extra seco"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Preg\u0103tit", "5": "Preg\u0103tit",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "F\u0103r\u0103 uscare",
"1": "C\u0103lcare",
"2": "\u0218ifonier preg\u0103tit",
"3": "\u0218ifonier preg\u0103tit",
"4": "Uscare suplimentar\u0103",
"12": "C\u0103lcare",
"13": "\u0218ifonier preg\u0103tit",
"14": "Gata de purtat",
"15": "Uscare suplimentar\u0103"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Uscarea l\u00e2nii", "wool_dry": "Uscarea l\u00e2nii",
"wool_soft_care": "L\u00e2n\u0103 & \u00cengrijire Bl\u00e2nd\u0103" "wool_soft_care": "L\u00e2n\u0103 & \u00cengrijire Bl\u00e2nd\u0103"
} }
},
"dry_levels": {
"state": {
"0": "F\u0103r\u0103 uscare",
"1": "C\u0103lcare",
"2": "\u0218ifonier preg\u0103tit",
"3": "\u0218ifonier preg\u0103tit",
"4": "Uscare suplimentar\u0103",
"12": "C\u0103lcare",
"13": "\u0218ifonier preg\u0103tit",
"14": "Gata de purtat",
"15": "Uscare suplimentar\u0103"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "\u0413\u043e\u0442\u043e\u0432\u043e", "5": "\u0413\u043e\u0442\u043e\u0432\u043e",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "\u0411\u0435\u0437 \u0441\u0443\u0448\u043a\u0438",
"1": "\u041f\u043e\u0434 \u0443\u0442\u044e\u0433",
"2": "\u0412 \u0448\u043a\u0430\u0444",
"3": "\u0413\u043e\u0442\u043e\u0432\u043e \u0432 \u0448\u043a\u0430\u0444",
"4": "\u042d\u043a\u0441\u0442\u0440\u0430 \u0441\u0443\u0448\u043a\u0430",
"12": "\u041f\u043e\u0434 \u0443\u0442\u044e\u0433",
"13": "\u0413\u043e\u0442\u043e\u0432\u043e \u0432 \u0448\u043a\u0430\u0444",
"14": "\u0413\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u043d\u0430\u0434\u0435\u0432\u0430\u043d\u0438\u044f",
"15": "\u042d\u043a\u0441\u0442\u0440\u0430 \u0441\u0443\u0448\u043a\u0430"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "\u0421\u0443\u0448\u043a\u0430 \u0448\u0435\u0440\u0441\u0442\u0438", "wool_dry": "\u0421\u0443\u0448\u043a\u0430 \u0448\u0435\u0440\u0441\u0442\u0438",
"wool_soft_care": "\u0448\u0435\u0440\u0441\u0442\u044c & \u0434\u0435\u043b\u0438\u043a\u0430\u0442\u043d\u044b\u0439 \u0443\u0445\u043e\u0434" "wool_soft_care": "\u0448\u0435\u0440\u0441\u0442\u044c & \u0434\u0435\u043b\u0438\u043a\u0430\u0442\u043d\u044b\u0439 \u0443\u0445\u043e\u0434"
} }
},
"dry_levels": {
"state": {
"0": "\u0411\u0435\u0437 \u0441\u0443\u0448\u043a\u0438",
"1": "\u041f\u043e\u0434 \u0443\u0442\u044e\u0433",
"2": "\u0412 \u0448\u043a\u0430\u0444",
"3": "\u0413\u043e\u0442\u043e\u0432\u043e \u0432 \u0448\u043a\u0430\u0444",
"4": "\u042d\u043a\u0441\u0442\u0440\u0430 \u0441\u0443\u0448\u043a\u0430",
"12": "\u041f\u043e\u0434 \u0443\u0442\u044e\u0433",
"13": "\u0413\u043e\u0442\u043e\u0432\u043e \u0432 \u0448\u043a\u0430\u0444",
"14": "\u0413\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u043d\u0430\u0434\u0435\u0432\u0430\u043d\u0438\u044f",
"15": "\u042d\u043a\u0441\u0442\u0440\u0430 \u0441\u0443\u0448\u043a\u0430"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Pripraven\u00e9", "5": "Pripraven\u00e9",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Bez su\u0161enia",
"1": "\u017dehlenie",
"2": "\u0160atn\u00edk pripraven\u00fd",
"3": "\u0160atn\u00edk pripraven\u00fd",
"4": "Extra su\u0161enie",
"12": "\u017dehlenie",
"13": "\u0160atn\u00edk pripraven\u00fd",
"14": "Hotov\u00e9 na nosenie",
"15": "Extra su\u0161enie"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Vlna such\u00e1", "wool_dry": "Vlna such\u00e1",
"wool_soft_care": "Vlna & M\u00e4kk\u00e1 starostlivost" "wool_soft_care": "Vlna & M\u00e4kk\u00e1 starostlivost"
} }
},
"dry_levels": {
"state": {
"0": "Bez su\u0161enia",
"1": "\u017dehlenie",
"2": "\u0160atn\u00edk pripraven\u00fd",
"3": "\u0160atn\u00edk pripraven\u00fd",
"4": "Extra su\u0161enie",
"12": "\u017dehlenie",
"13": "\u0160atn\u00edk pripraven\u00fd",
"14": "Hotov\u00e9 na nosenie",
"15": "Extra su\u0161enie"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Pripravljen", "5": "Pripravljen",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Brez su\u0161enja",
"1": "Likanje",
"2": "Suho za omaro",
"3": "Suho za omaro",
"4": "Zelo suho",
"12": "Likanje",
"13": "Suho za omaro",
"14": "Pripravljeno za uporabo",
"15": "Zelo suho"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Su\u0161enje volne", "wool_dry": "Su\u0161enje volne",
"wool_soft_care": "Volna & Nega Za Mehkobo" "wool_soft_care": "Volna & Nega Za Mehkobo"
} }
},
"dry_levels": {
"state": {
"0": "Brez su\u0161enja",
"1": "Likanje",
"2": "Suho za omaro",
"3": "Suho za omaro",
"4": "Zelo suho",
"12": "Likanje",
"13": "Suho za omaro",
"14": "Pripravljeno za uporabo",
"15": "Zelo suho"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Spremno", "5": "Spremno",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Bez su\u0161enja",
"1": "Peglanje",
"2": "Suvo za ormar",
"3": "Suvo za ormar",
"4": "Ekstra suvo",
"12": "Peglanje",
"13": "Suvo za ormar",
"14": "Spremno za no\u0161enje",
"15": "Ekstra suvo"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Su\u0161enje vune", "wool_dry": "Su\u0161enje vune",
"wool_soft_care": "Vuna & Blagi Tretman" "wool_soft_care": "Vuna & Blagi Tretman"
} }
},
"dry_levels": {
"state": {
"0": "Bez su\u0161enja",
"1": "Peglanje",
"2": "Suvo za ormar",
"3": "Suvo za ormar",
"4": "Ekstra suvo",
"12": "Peglanje",
"13": "Suvo za ormar",
"14": "Spremno za no\u0161enje",
"15": "Ekstra suvo"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "Haz\u0131r", "5": "Haz\u0131r",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "Kurutma yok",
"1": "\u00dct\u00fc",
"2": "Gard\u0131rop haz\u0131r",
"3": "Gard\u0131rop haz\u0131r",
"4": "Ekstra kurutma",
"12": "\u00dct\u00fc",
"13": "Gard\u0131rop haz\u0131r",
"14": "Giyilmeye haz\u0131r",
"15": "Ekstra kurutma"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "Y\u00fcnl\u00fc kurutma", "wool_dry": "Y\u00fcnl\u00fc kurutma",
"wool_soft_care": "Y\u00fcnl\u00fc & Hassas" "wool_soft_care": "Y\u00fcnl\u00fc & Hassas"
} }
},
"dry_levels": {
"state": {
"0": "Kurutma yok",
"1": "\u00dct\u00fc",
"2": "Gard\u0131rop haz\u0131r",
"3": "Gard\u0131rop haz\u0131r",
"4": "Ekstra kurutma",
"12": "\u00dct\u00fc",
"13": "Gard\u0131rop haz\u0131r",
"14": "Giyilmeye haz\u0131r",
"15": "Ekstra kurutma"
}
} }
} }
} }

View File

@ -65,6 +65,19 @@
"5": "\u5c31\u7eea", "5": "\u5c31\u7eea",
"6": "Hot rinse" "6": "Hot rinse"
} }
},
"dry_levels": {
"state": {
"0": "\u4e0d\u70d8\u5e72",
"1": "\u71a8\u70eb",
"2": "\u8863\u67dc\u5c31\u7eea",
"3": "\u8863\u67dc\u5c31\u7eea",
"4": "\u7279\u5e72",
"12": "\u71a8\u70eb",
"13": "\u8863\u67dc\u5c31\u7eea",
"14": "\u53ef\u7a7f",
"15": "\u7279\u5e72"
}
} }
}, },
"select": { "select": {
@ -705,6 +718,19 @@
"wool_dry": "\u7f8a\u6bdb\u8863\u7269\u70d8\u5e72", "wool_dry": "\u7f8a\u6bdb\u8863\u7269\u70d8\u5e72",
"wool_soft_care": "\u7f8a\u6bdb" "wool_soft_care": "\u7f8a\u6bdb"
} }
},
"dry_levels": {
"state": {
"0": "\u4e0d\u70d8\u5e72",
"1": "\u71a8\u70eb",
"2": "\u8863\u67dc\u5c31\u7eea",
"3": "\u8863\u67dc\u5c31\u7eea",
"4": "\u7279\u5e72",
"12": "\u71a8\u70eb",
"13": "\u8863\u67dc\u5c31\u7eea",
"14": "\u53ef\u7a7f",
"15": "\u7279\u5e72"
}
} }
} }
} }

View File

@ -86,13 +86,28 @@ DISHWASHER_PR_PHASE = {
6: "WASHING_CMD&CTRL.PHASE_HOT_RINSE.TITLE", 6: "WASHING_CMD&CTRL.PHASE_HOT_RINSE.TITLE",
} }
TUMBLE_DRYER_DRY_LEVEL = {
0: "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_MAIN_OPTIONS.NO_DRY",
1: "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_OPTIONS_VALUES_DESCRIPTION.IRON_DRY",
2: "WASHING_CMD&CTRL.GUIDED_WASHING_SYMBOLS_DRYING.NO_DRY_IRON_TITLE",
3: "WASHING_CMD&CTRL.GUIDED_WASHING_SYMBOLS_DRYING.CUPBOARD_DRY_TITLE",
4: "WASHING_CMD&CTRL.GUIDED_WASHING_SYMBOLS_DRYING.EXTRA_DRY_TITLE",
12: "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_OPTIONS_VALUES_DESCRIPTION.IRON_DRY",
13: "WASHING_CMD&CTRL.GUIDED_WASHING_SYMBOLS_DRYING.CUPBOARD_DRY_TITLE",
14: "WASHING_CMD&CTRL.GUIDED_WASHING_SYMBOLS_DRYING.READY_TO_WEAR_TITLE",
15: "WASHING_CMD&CTRL.GUIDED_WASHING_SYMBOLS_DRYING.EXTRA_DRY_TITLE",
}
SENSOR = { SENSOR = {
"washing_modes": MACH_MODE, "washing_modes": MACH_MODE,
"program_phases_wm": WASHING_PR_PHASE, "program_phases_wm": WASHING_PR_PHASE,
"program_phases_td": TUMBLE_DRYER_PR_PHASE, "program_phases_td": TUMBLE_DRYER_PR_PHASE,
"program_phases_dw": DISHWASHER_PR_PHASE, "program_phases_dw": DISHWASHER_PR_PHASE,
"dry_levels": TUMBLE_DRYER_DRY_LEVEL,
} }
SELECT = {"dry_levels": TUMBLE_DRYER_DRY_LEVEL}
PROGRAMS = { PROGRAMS = {
"programs_dw": "PROGRAMS.DW", "programs_dw": "PROGRAMS.DW",
"programs_ih": "PROGRAMS.IH", "programs_ih": "PROGRAMS.IH",
@ -158,6 +173,14 @@ def load_keys(full_key, json_data):
} }
def add_data(old, original, fallback, data, name, entity="sensor"):
sensor = old.setdefault("entity", {}).setdefault(entity, {})
for number, phase in data.items():
state = sensor.setdefault(name, {}).setdefault("state", {})
if key := load_key(phase, original, fallback):
state[str(number)] = key
def main(): def main():
hass = load_hass_translations() hass = load_hass_translations()
hon = load_hon_translations() hon = load_hon_translations()
@ -167,11 +190,9 @@ def main():
original = load_json(hon.get(language, "")) original = load_json(hon.get(language, ""))
old = load_json(hass.get(language, "")) old = load_json(hass.get(language, ""))
for name, data in SENSOR.items(): for name, data in SENSOR.items():
sensor = old.setdefault("entity", {}).setdefault("sensor", {}) add_data(old, original, fallback, data, name)
for number, phase in data.items(): for name, data in SELECT.items():
state = sensor.setdefault(name, {}).setdefault("state", {}) add_data(old, original, fallback, data, name, "select")
if key := load_key(phase, original, fallback):
state[str(number)] = key
for name, program in PROGRAMS.items(): for name, program in PROGRAMS.items():
select = old.setdefault("entity", {}).setdefault("select", {}) select = old.setdefault("entity", {}).setdefault("select", {})
select.setdefault(name, {})["state"] = load_keys(program, original) select.setdefault(name, {})["state"] = load_keys(program, original)