From fbd1bdf5babb042d198b86ec1c5349284286fdbd Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Wed, 21 Jun 2023 19:52:32 +0200 Subject: [PATCH] Split program and mach mode of ac #75 --- custom_components/hon/climate.py | 47 +++++++++++++++++----- custom_components/hon/number.py | 2 + custom_components/hon/select.py | 6 ++- custom_components/hon/translations/cs.json | 26 +++++++++++- custom_components/hon/translations/de.json | 26 +++++++++++- custom_components/hon/translations/el.json | 26 +++++++++++- custom_components/hon/translations/en.json | 26 +++++++++++- custom_components/hon/translations/es.json | 26 +++++++++++- custom_components/hon/translations/fr.json | 26 +++++++++++- custom_components/hon/translations/he.json | 10 ++++- custom_components/hon/translations/hr.json | 26 +++++++++++- custom_components/hon/translations/it.json | 26 +++++++++++- custom_components/hon/translations/nl.json | 26 +++++++++++- custom_components/hon/translations/pl.json | 26 +++++++++++- custom_components/hon/translations/pt.json | 26 +++++++++++- custom_components/hon/translations/ro.json | 26 +++++++++++- custom_components/hon/translations/ru.json | 26 +++++++++++- custom_components/hon/translations/sk.json | 26 +++++++++++- custom_components/hon/translations/sl.json | 26 +++++++++++- custom_components/hon/translations/sr.json | 26 +++++++++++- custom_components/hon/translations/tr.json | 26 +++++++++++- custom_components/hon/translations/zh.json | 26 +++++++++++- scripts/translation_keys.py | 6 +++ 23 files changed, 508 insertions(+), 31 deletions(-) diff --git a/custom_components/hon/climate.py b/custom_components/hon/climate.py index c2bd3f2..31e8c24 100644 --- a/custom_components/hon/climate.py +++ b/custom_components/hon/climate.py @@ -22,7 +22,7 @@ from homeassistant.const import ( from homeassistant.core import callback from pyhon.appliance import HonAppliance -from .const import HON_HVAC_MODE, HON_FAN, HON_HVAC_PROGRAM, DOMAIN +from .const import HON_HVAC_MODE, HON_FAN, DOMAIN from .hon import HonEntity _LOGGER = logging.getLogger(__name__) @@ -115,13 +115,14 @@ class HonACClimateEntity(HonEntity, ClimateEntity): super().__init__(hass, entry, device, description) self._attr_temperature_unit = TEMP_CELSIUS - self._attr_target_temperature_step = device.settings["settings.tempSel"].step - self._attr_max_temp = device.settings["settings.tempSel"].max - self._attr_min_temp = device.settings["settings.tempSel"].min + self._set_temperature_bound() self._attr_hvac_modes = [HVACMode.OFF] for mode in device.settings["settings.machMode"].values: self._attr_hvac_modes.append(HON_HVAC_MODE[mode]) + self._attr_preset_modes = [] + for mode in device.settings["startProgram.program"].values: + self._attr_preset_modes.append(mode) self._attr_fan_modes = [FAN_OFF] for mode in device.settings["settings.windSpeed"].values: self._attr_fan_modes.append(HON_FAN[mode]) @@ -135,10 +136,18 @@ class HonACClimateEntity(HonEntity, ClimateEntity): ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.SWING_MODE + | ClimateEntityFeature.PRESET_MODE ) self._handle_coordinator_update(update=False) + def _set_temperature_bound(self) -> None: + self._attr_target_temperature_step = self._device.settings[ + "settings.tempSel" + ].step + self._attr_max_temp = self._device.settings["settings.tempSel"].max + self._attr_min_temp = self._device.settings["settings.tempSel"].min + @property def target_temperature(self) -> int | None: """Return the temperature we try to reach.""" @@ -166,13 +175,31 @@ class HonACClimateEntity(HonEntity, ClimateEntity): async def async_set_hvac_mode(self, hvac_mode): self._attr_hvac_mode = hvac_mode if hvac_mode == HVACMode.OFF: - command = "stopProgram" + await self._device.commands["stopProgram"].send() + self._device.sync_command("stopProgram", "settings") else: - mode = HON_HVAC_PROGRAM[hvac_mode] - self._device.settings["startProgram.program"].value = mode - command = "startProgram" - await self._device.commands[command].send() - self._device.sync_command(command, "settings") + self._device.settings["settings.onOffStatus"].value = "1" + setting = self._device.settings["settings.machMode"] + modes = {HON_HVAC_MODE[number]: number for number in setting.values} + setting.value = modes[hvac_mode] + await self._device.commands["settings"].send() + self.async_write_ha_state() + + @property + def preset_mode(self) -> str | None: + """Return the current Preset for this channel.""" + return None + + async def async_set_preset_mode(self, preset_mode: str) -> None: + """Set the new preset mode.""" + if program := self._device.settings.get(f"startProgram.program"): + program.value = preset_mode + self._device.sync_command("startProgram", "settings") + self._set_temperature_bound() + self._handle_coordinator_update(update=False) + await self.coordinator.async_refresh() + self._attr_preset_mode = preset_mode + await self._device.commands["startProgram"].send() self.async_write_ha_state() @property diff --git a/custom_components/hon/number.py b/custom_components/hon/number.py index bec5c17..5bbdb56 100644 --- a/custom_components/hon/number.py +++ b/custom_components/hon/number.py @@ -236,6 +236,8 @@ class HonNumberEntity(HonEntity, NumberEntity): setting.value = value command = self.entity_description.key.split(".")[0] await self._device.commands[command].send() + if command != "settings": + self._device.sync_command(command, "settings") await self.coordinator.async_refresh() @callback diff --git a/custom_components/hon/select.py b/custom_components/hon/select.py index 046630c..7d04f9a 100644 --- a/custom_components/hon/select.py +++ b/custom_components/hon/select.py @@ -201,8 +201,6 @@ class HonConfigSelectEntity(HonEntity, SelectEntity): async def async_select_option(self, option: str) -> None: setting = self._device.settings[self.entity_description.key] setting.value = self._option_to_number(option, setting.values) - command = self.entity_description.key.split(".")[0] - await self._device.commands[command].send() await self.coordinator.async_refresh() @callback @@ -224,6 +222,10 @@ class HonSelectEntity(HonConfigSelectEntity): async def async_select_option(self, option: str) -> None: setting = self._device.settings[self.entity_description.key] setting.value = self._option_to_number(option, setting.values) + command = self.entity_description.key.split(".")[0] + await self._device.commands[command].send() + if command != "settings": + self._device.sync_command(command, "settings") await self.coordinator.async_refresh() @property diff --git a/custom_components/hon/translations/cs.json b/custom_components/hon/translations/cs.json index 2d66d47..f801b0d 100644 --- a/custom_components/hon/translations/cs.json +++ b/custom_components/hon/translations/cs.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Klimatizační jednotka" + "name": "Klimatizační jednotka", + "state_attributes": { + "preset_mode": { + "name": "Programy", + "state": { + "iot_10_heating": "Funkce Vytápění 10 °C", + "iot_auto": "Auto", + "iot_cool": "Chlazení", + "iot_dry": "Odvlhčování", + "iot_fan": "Ventilátor", + "iot_heat": "Vytápění", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Automatické čištění", + "iot_self_clean": "Samočištění zamrazením", + "iot_self_clean_56": "Samočištění 56°C sterilizace ", + "iot_simple_start": "Spustit nyní", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + auto", + "iot_uv_and_cool": "UV + zchlazení", + "iot_uv_and_dry": "UV + odstranění vlhkosti", + "iot_uv_and_fan": "UV + ventilátor", + "iot_uv_and_heat": "UV + ohřev" + } + } + } }, "fridge": { "name": "Chladnička", diff --git a/custom_components/hon/translations/de.json b/custom_components/hon/translations/de.json index 7cf3cf3..d2df5ef 100644 --- a/custom_components/hon/translations/de.json +++ b/custom_components/hon/translations/de.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Klimaanlage" + "name": "Klimaanlage", + "state_attributes": { + "preset_mode": { + "name": "Programme", + "state": { + "iot_10_heating": "10°C Heizfunktion", + "iot_auto": "Auto", + "iot_cool": "Kühl", + "iot_dry": "Trocken", + "iot_fan": "Ventilator", + "iot_heat": "Heizen", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Selbst reinigen", + "iot_self_clean": "Self-Clean", + "iot_self_clean_56": "Steri-Clean 56°C", + "iot_simple_start": "Jetzt beginnen", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Auto", + "iot_uv_and_cool": "UV + Kalt", + "iot_uv_and_dry": "UV + Entfeuchter", + "iot_uv_and_fan": "UV + Gebläse", + "iot_uv_and_heat": "UV + Heizen" + } + } + } }, "fridge": { "name": "Kühlschrank", diff --git a/custom_components/hon/translations/el.json b/custom_components/hon/translations/el.json index 93d4665..8fe6ba1 100644 --- a/custom_components/hon/translations/el.json +++ b/custom_components/hon/translations/el.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Κλιματιστικό" + "name": "Κλιματιστικό", + "state_attributes": { + "preset_mode": { + "name": "Προγράμματα", + "state": { + "iot_10_heating": "10° C Λειτουργία θέρμανσης", + "iot_auto": "Αυτόματο", + "iot_cool": "Ψύξη", + "iot_dry": "Στέγνωμα", + "iot_fan": "Ανεμιστήρας", + "iot_heat": "Ζέστη", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Αυτοκαθαρισμός", + "iot_self_clean": "Αυτοκαθαρισμός", + "iot_self_clean_56": "Steri-Clean 56°C", + "iot_simple_start": "Εκκίνηση τώρα", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Auto", + "iot_uv_and_cool": "UV + Ψύξη", + "iot_uv_and_dry": "UV + Αφυγραντήρας", + "iot_uv_and_fan": "UV + Ανεμιστήρας", + "iot_uv_and_heat": "UV + Θέρμανση" + } + } + } }, "fridge": { "name": "Ψυγείο", diff --git a/custom_components/hon/translations/en.json b/custom_components/hon/translations/en.json index f14fa71..514c214 100644 --- a/custom_components/hon/translations/en.json +++ b/custom_components/hon/translations/en.json @@ -1868,7 +1868,31 @@ }, "climate": { "air_conditioner": { - "name": "Air conditioner" + "name": "Air conditioner", + "state_attributes": { + "preset_mode": { + "name": "Programs", + "state": { + "iot_10_heating": "10°C Heating function", + "iot_auto": "Auto", + "iot_cool": "Cool", + "iot_dry": "Dry", + "iot_fan": "Fan", + "iot_heat": "Heat", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Self-purify", + "iot_self_clean": "Self-clean", + "iot_self_clean_56": "Steri-Clean 56°C", + "iot_simple_start": "Start now", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Auto", + "iot_uv_and_cool": "UV + Cold", + "iot_uv_and_dry": "UV + Dehumidifier", + "iot_uv_and_fan": "UV + Fan", + "iot_uv_and_heat": "UV + Heat" + } + } + } }, "fridge": { "name": "Fridge", diff --git a/custom_components/hon/translations/es.json b/custom_components/hon/translations/es.json index 02dd717..cc3d0b6 100644 --- a/custom_components/hon/translations/es.json +++ b/custom_components/hon/translations/es.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Aire acondicionado" + "name": "Aire acondicionado", + "state_attributes": { + "preset_mode": { + "name": "Programas", + "state": { + "iot_10_heating": "Función de calentamiento de 10° C", + "iot_auto": "Automático", + "iot_cool": "Frío", + "iot_dry": "Deshumidificar", + "iot_fan": "Ventilador", + "iot_heat": "Calor", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Autopurificar", + "iot_self_clean": "Autolimpieza", + "iot_self_clean_56": "Limpieza desinfectante 56°", + "iot_simple_start": "Iniciar ahora", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Automático", + "iot_uv_and_cool": "UV + Frío", + "iot_uv_and_dry": "UV + Deshumidificador", + "iot_uv_and_fan": "UV + Ventilador", + "iot_uv_and_heat": "UV + Calor" + } + } + } }, "fridge": { "name": "Frigorífico", diff --git a/custom_components/hon/translations/fr.json b/custom_components/hon/translations/fr.json index fe78f66..2478178 100644 --- a/custom_components/hon/translations/fr.json +++ b/custom_components/hon/translations/fr.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Climatiseur" + "name": "Climatiseur", + "state_attributes": { + "preset_mode": { + "name": "Programmes", + "state": { + "iot_10_heating": "Fonction Chauffage 10 °C", + "iot_auto": "Automatique", + "iot_cool": "Frais", + "iot_dry": "Sec", + "iot_fan": "Ventilateur", + "iot_heat": "Chaleur", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Auto-purification", + "iot_self_clean": "Auto-nettoyage", + "iot_self_clean_56": "Steri-Clean 56°C", + "iot_simple_start": "Démarrez maintenant", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Auto", + "iot_uv_and_cool": "UV + Froid", + "iot_uv_and_dry": "UV + Déshumidificateur", + "iot_uv_and_fan": "UV + ventilateur", + "iot_uv_and_heat": "UV + Chaleur" + } + } + } }, "fridge": { "name": "Réfrigérateur", diff --git a/custom_components/hon/translations/he.json b/custom_components/hon/translations/he.json index 7a0ff87..a68d88c 100644 --- a/custom_components/hon/translations/he.json +++ b/custom_components/hon/translations/he.json @@ -964,7 +964,15 @@ }, "climate": { "air_conditioner": { - "name": "Air conditioner" + "name": "Air conditioner", + "state_attributes": { + "preset_mode": { + "name": "Programs", + "state": { + "iot_simple_start": "התחל עכשיו" + } + } + } }, "fridge": { "name": "Fridge", diff --git a/custom_components/hon/translations/hr.json b/custom_components/hon/translations/hr.json index 385085f..2c66312 100644 --- a/custom_components/hon/translations/hr.json +++ b/custom_components/hon/translations/hr.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Klimatizacijski uređaj" + "name": "Klimatizacijski uređaj", + "state_attributes": { + "preset_mode": { + "name": "Programi", + "state": { + "iot_10_heating": "Funkcija grijanja na 10 °C", + "iot_auto": "Automatski", + "iot_cool": "Hlađenje", + "iot_dry": "Sušenje", + "iot_fan": "Ventilator", + "iot_heat": "Zagrijavanje", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Sampročišćavanje", + "iot_self_clean": "Samočišćenje", + "iot_self_clean_56": "Sterilno čišćenje 56°C", + "iot_simple_start": "Pokreni sada", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + automatski", + "iot_uv_and_cool": "UV + hladno", + "iot_uv_and_dry": "UV + odvlaživač", + "iot_uv_and_fan": "UV + ventilator", + "iot_uv_and_heat": "UV + grijanje" + } + } + } }, "fridge": { "name": "Hladnjak", diff --git a/custom_components/hon/translations/it.json b/custom_components/hon/translations/it.json index dcad47c..fe02131 100644 --- a/custom_components/hon/translations/it.json +++ b/custom_components/hon/translations/it.json @@ -1844,7 +1844,31 @@ }, "climate": { "air_conditioner": { - "name": "Condizionatore" + "name": "Condizionatore", + "state_attributes": { + "preset_mode": { + "name": "Programmi", + "state": { + "iot_10_heating": "Funzione 10°C Heating ", + "iot_auto": "Auto", + "iot_cool": "Freddo", + "iot_dry": "Deumidificazione", + "iot_fan": "Ventilatore", + "iot_heat": "Caldo", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Self purify", + "iot_self_clean": "Self clean", + "iot_self_clean_56": "Steri-Clean 56°C", + "iot_simple_start": "Avvia ora", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Auto", + "iot_uv_and_cool": "UV + Freddo", + "iot_uv_and_dry": "UV + Deumidificatore", + "iot_uv_and_fan": "UV + Ventola", + "iot_uv_and_heat": "UV + Caldo" + } + } + } }, "fridge": { "name": "Frigorifero", diff --git a/custom_components/hon/translations/nl.json b/custom_components/hon/translations/nl.json index ba5c686..524522a 100644 --- a/custom_components/hon/translations/nl.json +++ b/custom_components/hon/translations/nl.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Airconditioner" + "name": "Airconditioner", + "state_attributes": { + "preset_mode": { + "name": "Programma's", + "state": { + "iot_10_heating": "10°C-verwarmingsfunctie", + "iot_auto": "Automatisch", + "iot_cool": "Koelen", + "iot_dry": "Drogen", + "iot_fan": "Ventilator", + "iot_heat": "Verwarming", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Zelfzuivering", + "iot_self_clean": "Zelfreiniging", + "iot_self_clean_56": "Sterilisatie reiniging 56°C", + "iot_simple_start": "Start nu", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Auto", + "iot_uv_and_cool": "UV + Koud", + "iot_uv_and_dry": "UV + Ontvochtiger", + "iot_uv_and_fan": "UV + Hetelucht", + "iot_uv_and_heat": "UV + Warmte" + } + } + } }, "fridge": { "name": "Koelkast", diff --git a/custom_components/hon/translations/pl.json b/custom_components/hon/translations/pl.json index a9a0096..9a9513b 100644 --- a/custom_components/hon/translations/pl.json +++ b/custom_components/hon/translations/pl.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Klimatyzator" + "name": "Klimatyzator", + "state_attributes": { + "preset_mode": { + "name": "Programy", + "state": { + "iot_10_heating": "Funkcja grzania 10°C", + "iot_auto": "Auto", + "iot_cool": "Chłodzenie", + "iot_dry": "Osuszanie", + "iot_fan": "Wentylator", + "iot_heat": "Grzanie", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Self Purify", + "iot_self_clean": "Self Clean", + "iot_self_clean_56": "Steri Clean 56°C", + "iot_simple_start": "Uruchom teraz", + "iot_uv": "Sterylizacja UVC", + "iot_uv_and_auto": "UV + automat", + "iot_uv_and_cool": "UV + chłodzenie", + "iot_uv_and_dry": "UV + osuszacz powietrza", + "iot_uv_and_fan": "UV + wentylator", + "iot_uv_and_heat": "UV + podgrzewanie" + } + } + } }, "fridge": { "name": "Lodówka", diff --git a/custom_components/hon/translations/pt.json b/custom_components/hon/translations/pt.json index 44ad0e8..1ad5fe1 100644 --- a/custom_components/hon/translations/pt.json +++ b/custom_components/hon/translations/pt.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Ar Condicionado" + "name": "Ar Condicionado", + "state_attributes": { + "preset_mode": { + "name": "Programas", + "state": { + "iot_10_heating": "Função de aquecimento de 10 °C", + "iot_auto": "Auto", + "iot_cool": "Frio", + "iot_dry": "Secar", + "iot_fan": "Ventilador", + "iot_heat": "Calor", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Autopurificação", + "iot_self_clean": "Autolimpeza", + "iot_self_clean_56": "Steri-Clean 56°C", + "iot_simple_start": "Iniciar agora", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Auto", + "iot_uv_and_cool": "UV + Frio", + "iot_uv_and_dry": "UV + Desumidificador", + "iot_uv_and_fan": "UV + Ventilação", + "iot_uv_and_heat": "UV + Calor" + } + } + } }, "fridge": { "name": "Frigorífico", diff --git a/custom_components/hon/translations/ro.json b/custom_components/hon/translations/ro.json index d750b22..820a2d7 100644 --- a/custom_components/hon/translations/ro.json +++ b/custom_components/hon/translations/ro.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Aer condiționat" + "name": "Aer condiționat", + "state_attributes": { + "preset_mode": { + "name": "Programe", + "state": { + "iot_10_heating": "Funcția de încălzire la 10 °C", + "iot_auto": "Automat", + "iot_cool": "Răcire", + "iot_dry": "Uscare", + "iot_fan": "Ventilare", + "iot_heat": "Încălzire", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Auto-purificare", + "iot_self_clean": "Autocurățare", + "iot_self_clean_56": "Curățare-sterilizare la 56°C", + "iot_simple_start": "Începeți acum", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + automat", + "iot_uv_and_cool": "UV + răcire", + "iot_uv_and_dry": "UV + dezumidificator", + "iot_uv_and_fan": "UV + ventilator", + "iot_uv_and_heat": "UV + încălzire" + } + } + } }, "fridge": { "name": "Frigider", diff --git a/custom_components/hon/translations/ru.json b/custom_components/hon/translations/ru.json index ffecc52..7c8eb0e 100644 --- a/custom_components/hon/translations/ru.json +++ b/custom_components/hon/translations/ru.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Кондиционер воздуха" + "name": "Кондиционер воздуха", + "state_attributes": { + "preset_mode": { + "name": "Программы", + "state": { + "iot_10_heating": "Функция нагрева до 10°C", + "iot_auto": "Авто", + "iot_cool": "Охлаждение", + "iot_dry": "Сушка", + "iot_fan": "Вентилятор", + "iot_heat": "Нагрев", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Самоочищение", + "iot_self_clean": "Самоочистка", + "iot_self_clean_56": "Steri-Clean 56°C", + "iot_simple_start": "Пуск сейчас", + "iot_uv": "Ультрафиолет", + "iot_uv_and_auto": "УФ + Авто", + "iot_uv_and_cool": "УФ + Охлаждение", + "iot_uv_and_dry": "УФ + Осушитель", + "iot_uv_and_fan": "УФ + Вентилятор", + "iot_uv_and_heat": "УФ + Нагрев" + } + } + } }, "fridge": { "name": "Холодильник", diff --git a/custom_components/hon/translations/sk.json b/custom_components/hon/translations/sk.json index 1d84748..1967d9f 100644 --- a/custom_components/hon/translations/sk.json +++ b/custom_components/hon/translations/sk.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Klimatizácia" + "name": "Klimatizácia", + "state_attributes": { + "preset_mode": { + "name": "Programy", + "state": { + "iot_10_heating": "Funkcia vykurovania na 10 °C", + "iot_auto": "Automatika", + "iot_cool": "Chladiť", + "iot_dry": "Sušiť", + "iot_fan": "Ventilátor", + "iot_heat": "Ohrev", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Samoprečisťovanie", + "iot_self_clean": "Samočistenie", + "iot_self_clean_56": "Sterilné čistenie 56°C", + "iot_simple_start": "Spustiť teraz", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Auto", + "iot_uv_and_cool": "UV + Studené", + "iot_uv_and_dry": "UV + Odvlhčovač", + "iot_uv_and_fan": "UV + Ventilátor", + "iot_uv_and_heat": "UV + Ohrev" + } + } + } }, "fridge": { "name": "Chladnička", diff --git a/custom_components/hon/translations/sl.json b/custom_components/hon/translations/sl.json index cedf8f8..5c22857 100644 --- a/custom_components/hon/translations/sl.json +++ b/custom_components/hon/translations/sl.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Klimatska naprava" + "name": "Klimatska naprava", + "state_attributes": { + "preset_mode": { + "name": "Programi", + "state": { + "iot_10_heating": "Funkcija ogrevanja pri 10 °C", + "iot_auto": "Samodejno", + "iot_cool": "Hlajenje", + "iot_dry": "Sušenje", + "iot_fan": "Ventilator", + "iot_heat": "Segrevanje", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Samoočiščevanje", + "iot_self_clean": "Samodejno čiščenje", + "iot_self_clean_56": "Sterilno čiščenje 56°C", + "iot_simple_start": "Zaženi zdaj", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + samodejno", + "iot_uv_and_cool": "UV + hlajenje", + "iot_uv_and_dry": "UV + razvlaževanje", + "iot_uv_and_fan": "UV + ventilator", + "iot_uv_and_heat": "UV + gretje" + } + } + } }, "fridge": { "name": "Hladilnik", diff --git a/custom_components/hon/translations/sr.json b/custom_components/hon/translations/sr.json index aaa157e..f86e6de 100644 --- a/custom_components/hon/translations/sr.json +++ b/custom_components/hon/translations/sr.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Klima uređaj" + "name": "Klima uređaj", + "state_attributes": { + "preset_mode": { + "name": "Programi", + "state": { + "iot_10_heating": "Funkcija grejanja – 10° C", + "iot_auto": "Automatski", + "iot_cool": "Hlađenje", + "iot_dry": "Sušenje", + "iot_fan": "Ventilator", + "iot_heat": "Toplota", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Samopročišćavanje", + "iot_self_clean": "Samočišćenje", + "iot_self_clean_56": "Sterilno čišćenje 56°C", + "iot_simple_start": "Pokrenuti sada", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + automatsko", + "iot_uv_and_cool": "UV+ hladno", + "iot_uv_and_dry": "UV + odvlaživač", + "iot_uv_and_fan": "UV + ventilator", + "iot_uv_and_heat": "UV + toplota" + } + } + } }, "fridge": { "name": "Frižider", diff --git a/custom_components/hon/translations/tr.json b/custom_components/hon/translations/tr.json index 562fd7f..c32c931 100644 --- a/custom_components/hon/translations/tr.json +++ b/custom_components/hon/translations/tr.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "Klima" + "name": "Klima", + "state_attributes": { + "preset_mode": { + "name": "Programlar", + "state": { + "iot_10_heating": "10°C Isıtma fonksiyonu", + "iot_auto": "Otomatik", + "iot_cool": "Soğuk", + "iot_dry": "Kuru", + "iot_fan": "Fan", + "iot_heat": "Isı", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "Kendi kendini arındırma", + "iot_self_clean": "Kendi kendini temizleme", + "iot_self_clean_56": "Steril Temizleme 56°C", + "iot_simple_start": "Şimdi başlat", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + Otomatik", + "iot_uv_and_cool": "UV + Soğuk", + "iot_uv_and_dry": "UV + Nem giderici", + "iot_uv_and_fan": "UV + Fan", + "iot_uv_and_heat": "UV + Isıtma" + } + } + } }, "fridge": { "name": "Buzdolabı", diff --git a/custom_components/hon/translations/zh.json b/custom_components/hon/translations/zh.json index 0c2111e..c6a628c 100644 --- a/custom_components/hon/translations/zh.json +++ b/custom_components/hon/translations/zh.json @@ -1839,7 +1839,31 @@ }, "climate": { "air_conditioner": { - "name": "空调" + "name": "空调", + "state_attributes": { + "preset_mode": { + "name": "程序", + "state": { + "iot_10_heating": "10°C 加热功能", + "iot_auto": "自动", + "iot_cool": "冷却", + "iot_dry": "烘干", + "iot_fan": "风扇", + "iot_heat": "加热", + "iot_nano_aqua": "Nano Aqua", + "iot_purify": "自净", + "iot_self_clean": "自洁", + "iot_self_clean_56": "无菌清洁 56°C", + "iot_simple_start": "立即启动", + "iot_uv": "UV", + "iot_uv_and_auto": "UV + 自动", + "iot_uv_and_cool": "UV + 制冷", + "iot_uv_and_dry": "UV + 减湿器", + "iot_uv_and_fan": "UV + 风扇", + "iot_uv_and_heat": "UV + 加热" + } + } + } }, "fridge": { "name": "冰箱", diff --git a/scripts/translation_keys.py b/scripts/translation_keys.py index 57b5364..3f45cb1 100644 --- a/scripts/translation_keys.py +++ b/scripts/translation_keys.py @@ -159,6 +159,12 @@ CLIMATE = { "state": "PROGRAMS.OV", } }, + "air_conditioner": { + "preset_mode": { + "name": "OV.TABS.PROGRAMS_TITLE", + "state": "PROGRAMS.AC", + } + }, "wine": { "preset_mode": { "name": "WC.NAME",