From eb5ba43707008a50252695d72680c29e4e980df1 Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Sat, 10 Jun 2023 06:44:19 +0200 Subject: [PATCH] Add wine cellar --- README.md | 22 +++++++ custom_components/hon/climate.py | 26 ++++++-- custom_components/hon/sensor.py | 74 ++++++++++++++++++++++ custom_components/hon/switch.py | 11 ++++ custom_components/hon/translations/cs.json | 29 +++++++++ custom_components/hon/translations/de.json | 29 +++++++++ custom_components/hon/translations/el.json | 29 +++++++++ custom_components/hon/translations/en.json | 29 +++++++++ custom_components/hon/translations/es.json | 29 +++++++++ custom_components/hon/translations/fr.json | 29 +++++++++ custom_components/hon/translations/he.json | 11 ++++ custom_components/hon/translations/hr.json | 29 +++++++++ custom_components/hon/translations/it.json | 29 +++++++++ custom_components/hon/translations/nl.json | 29 +++++++++ custom_components/hon/translations/pl.json | 29 +++++++++ custom_components/hon/translations/pt.json | 29 +++++++++ custom_components/hon/translations/ro.json | 29 +++++++++ custom_components/hon/translations/ru.json | 29 +++++++++ custom_components/hon/translations/sk.json | 29 +++++++++ custom_components/hon/translations/sl.json | 29 +++++++++ custom_components/hon/translations/sr.json | 29 +++++++++ custom_components/hon/translations/tr.json | 29 +++++++++ custom_components/hon/translations/zh.json | 29 +++++++++ info.md | 1 + scripts/generate_translation.py | 7 ++ 25 files changed, 669 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 85eb1a1..a52cdaa 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Home Assistant integration for [Haier's mobile app hOn](https://hon-smarthome.co - [Fridge](https://github.com/Andre0512/hon#fridge) - [Hob](https://github.com/Andre0512/hon#hob) [BETA] - [Hood](https://github.com/Andre0512/hon#hood) [BETA] +- [Wine Cellar](https://github.com/Andre0512/hon#wine-cellar) [BETA] ## Installation **Method 1:** [![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=Andre0512&repository=hon&category=integration) @@ -356,6 +357,27 @@ For every device exists a hidden button which can be used to log all infos of yo | Steam level | `smoke` | `sensor` | `steamLevel` | | Temperature level | `thermometer` | `sensor` | `tempLevel` | +### Wine Cellar +#### Controls +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Light | `lightbulb` | `switch` | `lightStatus` | +| Sabbath Mode | `palm-tree` | `switch` | `sabbathStatus` | +| Wine Cellar | `thermometer` | `climate` | `settings.tempSel` | +| Wine Cellar | `thermometer` | `climate` | `settings.tempSelZ2` | +#### Sensors +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Error | `math-log` | `sensor` | `errors` | +| Humidity | `water-percent` | `sensor` | `humidityZ1` | +| Humidity 2 | `water-percent` | `sensor` | `humidityZ2` | +| Program | `play` | `sensor` | `programName` | +| Room Temperature | `home-thermometer-outline` | `sensor` | `tempEnv` | +| Selected Temperature | `thermometer` | `sensor` | `tempSel` | +| Selected Temperature 2 | `thermometer` | `sensor` | `tempSelZ2` | +| Temperature | `thermometer` | `sensor` | `temp` | +| Temperature 2 | `thermometer` | `sensor` | `tempZ2` | + ### Washer dryer #### Controls | Name | Icon | Entity | Key | diff --git a/custom_components/hon/climate.py b/custom_components/hon/climate.py index c8fd587..c2bd3f2 100644 --- a/custom_components/hon/climate.py +++ b/custom_components/hon/climate.py @@ -72,6 +72,22 @@ CLIMATES = { translation_key="oven", ), ), + "WC": ( + HonClimateEntityDescription( + key="settings.tempSel", + mode=HVACMode.COOL, + name="Wine Cellar", + icon="mdi:thermometer", + translation_key="wine", + ), + HonClimateEntityDescription( + key="settings.tempSelZ2", + mode=HVACMode.COOL, + name="Wine Cellar", + icon="mdi:thermometer", + translation_key="wine", + ), + ), } @@ -226,7 +242,7 @@ class HonClimateEntity(HonEntity, ClimateEntity): ) self._attr_hvac_modes = [description.mode] - if device.get("onOffStatus"): + if "stopProgram" in device.commands: self._attr_hvac_modes += [HVACMode.OFF] modes = [] else: @@ -245,15 +261,15 @@ class HonClimateEntity(HonEntity, ClimateEntity): self._handle_coordinator_update(update=False) @property - def target_temperature(self) -> int | None: + def target_temperature(self) -> float | None: """Return the temperature we try to reach.""" - return int(self._device.get(self.entity_description.key)) + return float(self._device.get(self.entity_description.key)) @property - def current_temperature(self) -> int | None: + def current_temperature(self) -> float | None: """Return the current temperature.""" temp_key = self.entity_description.key.split(".")[-1].replace("Sel", "") - return int(self._device.get(temp_key)) + return float(self._device.get(temp_key)) async def async_set_temperature(self, **kwargs): if (temperature := kwargs.get(ATTR_TEMPERATURE)) is None: diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index 7de75f9..f13870c 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -484,6 +484,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, + translation_key="target_temperature", ), HonSensorEntityDescription( key="programName", @@ -594,6 +595,79 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { icon="mdi:lightbulb", ), ), + "WC": ( + HonSensorEntityDescription( + key="errors", name="Error", icon="mdi:math-log", translation_key="errors" + ), + HonSensorEntityDescription( + key="humidityZ1", + name="Humidity", + icon="mdi:water-percent", + device_class=SensorDeviceClass.HUMIDITY, + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + translation_key="humidity", + ), + HonSensorEntityDescription( + key="humidityZ2", + name="Humidity 2", + icon="mdi:water-percent", + device_class=SensorDeviceClass.HUMIDITY, + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + translation_key="humidity", + ), + HonSensorEntityDescription( + key="temp", + name="Temperature", + icon="mdi:thermometer", + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + translation_key="temperature", + ), + HonSensorEntityDescription( + key="tempEnv", + name="Room Temperature", + icon="mdi:home-thermometer-outline", + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + translation_key="room_temperature", + ), + HonSensorEntityDescription( + key="tempSel", + name="Selected Temperature", + icon="mdi:thermometer", + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + translation_key="target_temperature", + ), + HonSensorEntityDescription( + key="tempSelZ2", + name="Selected Temperature 2", + icon="mdi:thermometer", + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + translation_key="target_temperature", + ), + HonSensorEntityDescription( + key="tempZ2", + name="Temperature 2", + icon="mdi:thermometer", + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + translation_key="temperature", + ), + HonSensorEntityDescription( + key="programName", + name="Program", + icon="mdi:play", + device_class=SensorDeviceClass.ENUM, + translation_key="programs_wc", + ), + ), } SENSORS["WD"] = unique_entities(SENSORS["WM"], SENSORS["TD"]) diff --git a/custom_components/hon/switch.py b/custom_components/hon/switch.py index b0af92e..03273a7 100644 --- a/custom_components/hon/switch.py +++ b/custom_components/hon/switch.py @@ -322,6 +322,17 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { translation_key="holiday_mode", ), ), + "WC": ( + HonSwitchEntityDescription( + key="sabbathStatus", + name="Sabbath Mode", + icon="mdi:palm-tree", + translation_key="holiday_mode", + ), + HonSwitchEntityDescription( + key="lightStatus", name="Light", icon="mdi:lightbulb" + ), + ), } SWITCHES["WD"] = unique_entities(SWITCHES["WD"], SWITCHES["WM"]) diff --git a/custom_components/hon/translations/cs.json b/custom_components/hon/translations/cs.json index 32d551d..e25af24 100644 --- a/custom_components/hon/translations/cs.json +++ b/custom_components/hon/translations/cs.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Program" + }, + "programs_wc": { + "state": { + "iot_champagne": "Šampaňské", + "iot_dessert": "Dezertní", + "iot_fortified": "Strukturované", + "iot_rose": "Růžové", + "iot_whisky": "Whisky", + "red": "Červené", + "sparkling": "Šumivé", + "white": "Bílé" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Vinný sklípek", + "state": { + "iot_champagne": "Šampaňské", + "iot_dessert": "Dezertní", + "iot_fortified": "Strukturované", + "iot_rose": "Růžové", + "iot_whisky": "Whisky", + "red": "Červené", + "sparkling": "Šumivé", + "white": "Bílé" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/de.json b/custom_components/hon/translations/de.json index 3948c4c..1d3dad2 100644 --- a/custom_components/hon/translations/de.json +++ b/custom_components/hon/translations/de.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Programm" + }, + "programs_wc": { + "state": { + "iot_champagne": "Champagner", + "iot_dessert": "Dessert", + "iot_fortified": "Strukturiert", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Rot", + "sparkling": "Sekt", + "white": "Weiß" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Weinklimaschrank", + "state": { + "iot_champagne": "Champagner", + "iot_dessert": "Dessert", + "iot_fortified": "Strukturiert", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Rot", + "sparkling": "Sekt", + "white": "Weiß" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/el.json b/custom_components/hon/translations/el.json index 67ea26c..1828572 100644 --- a/custom_components/hon/translations/el.json +++ b/custom_components/hon/translations/el.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Πρόγραμμα" + }, + "programs_wc": { + "state": { + "iot_champagne": "Σαμπάνια", + "iot_dessert": "Επιδόρπιο", + "iot_fortified": "Δομημένο", + "iot_rose": "Ροζέ", + "iot_whisky": "Ουίσκι", + "red": "Κόκκινο", + "sparkling": "Αφρώδες", + "white": "Λευκό" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Κάβα", + "state": { + "iot_champagne": "Σαμπάνια", + "iot_dessert": "Επιδόρπιο", + "iot_fortified": "Δομημένο", + "iot_rose": "Ροζέ", + "iot_whisky": "Ουίσκι", + "red": "Κόκκινο", + "sparkling": "Αφρώδες", + "white": "Λευκό" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/en.json b/custom_components/hon/translations/en.json index 865947d..a0be471 100644 --- a/custom_components/hon/translations/en.json +++ b/custom_components/hon/translations/en.json @@ -944,6 +944,18 @@ "zero_fresh": "0° Fresh" }, "name": "Program" + }, + "programs_wc": { + "state": { + "iot_champagne": "Champagne", + "iot_dessert": "Dessert", + "iot_fortified": "Fortified", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Red", + "sparkling": "Sparkling", + "white": "White" + } } }, "switch": { @@ -2055,6 +2067,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Wine Cellar", + "state": { + "iot_champagne": "Champagne", + "iot_dessert": "Dessert", + "iot_fortified": "Fortified", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Red", + "sparkling": "Sparkling", + "white": "White" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/es.json b/custom_components/hon/translations/es.json index 716bef3..d10ae74 100644 --- a/custom_components/hon/translations/es.json +++ b/custom_components/hon/translations/es.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Programa" + }, + "programs_wc": { + "state": { + "iot_champagne": "Champán", + "iot_dessert": "Postre", + "iot_fortified": "Estructurado", + "iot_rose": "Rosado", + "iot_whisky": "Whisky", + "red": "Tinto", + "sparkling": "Espumoso", + "white": "Blanco" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Cámara de vino", + "state": { + "iot_champagne": "Champán", + "iot_dessert": "Postre", + "iot_fortified": "Estructurado", + "iot_rose": "Rosado", + "iot_whisky": "Whisky", + "red": "Tinto", + "sparkling": "Espumoso", + "white": "Blanco" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/fr.json b/custom_components/hon/translations/fr.json index c8bef75..11ef229 100644 --- a/custom_components/hon/translations/fr.json +++ b/custom_components/hon/translations/fr.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Programme" + }, + "programs_wc": { + "state": { + "iot_champagne": "Champagne", + "iot_dessert": "Dessert", + "iot_fortified": "Corsé", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Rouge", + "sparkling": "Pétillant", + "white": "Blanc" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Cave à vin", + "state": { + "iot_champagne": "Champagne", + "iot_dessert": "Dessert", + "iot_fortified": "Corsé", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Rouge", + "sparkling": "Pétillant", + "white": "Blanc" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/he.json b/custom_components/hon/translations/he.json index 9a735c9..ef6d6be 100644 --- a/custom_components/hon/translations/he.json +++ b/custom_components/hon/translations/he.json @@ -444,6 +444,9 @@ "tea": "Cold drinks or Beverages" }, "name": "Program" + }, + "programs_wc": { + "state": {} } }, "select": { @@ -1064,6 +1067,14 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Wine Cellar", + "state": {} + } + } } }, "fan": { diff --git a/custom_components/hon/translations/hr.json b/custom_components/hon/translations/hr.json index 56f91e6..60f329c 100644 --- a/custom_components/hon/translations/hr.json +++ b/custom_components/hon/translations/hr.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Program" + }, + "programs_wc": { + "state": { + "iot_champagne": "Šampanjac", + "iot_dessert": "Desertno", + "iot_fortified": "Strukturirano", + "iot_rose": "Rosé", + "iot_whisky": "Viski", + "red": "Crno", + "sparkling": "Pjenušavo vino", + "white": "Bijelo vino" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Vinski hladnjak", + "state": { + "iot_champagne": "Šampanjac", + "iot_dessert": "Desertno", + "iot_fortified": "Strukturirano", + "iot_rose": "Rosé", + "iot_whisky": "Viski", + "red": "Crno", + "sparkling": "Pjenušavo vino", + "white": "Bijelo vino" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/it.json b/custom_components/hon/translations/it.json index c1bfb25..9416e94 100644 --- a/custom_components/hon/translations/it.json +++ b/custom_components/hon/translations/it.json @@ -929,6 +929,18 @@ "zero_fresh": "0° Fresh" }, "name": "Programma" + }, + "programs_wc": { + "state": { + "iot_champagne": "Champagne", + "iot_dessert": "Dolce", + "iot_fortified": "Strutturato", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Rosso", + "sparkling": "Bollicine", + "white": "Bianco" + } } }, "select": { @@ -2030,6 +2042,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Cantinetta", + "state": { + "iot_champagne": "Champagne", + "iot_dessert": "Dolce", + "iot_fortified": "Strutturato", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Rosso", + "sparkling": "Bollicine", + "white": "Bianco" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/nl.json b/custom_components/hon/translations/nl.json index a8cd576..e66115e 100644 --- a/custom_components/hon/translations/nl.json +++ b/custom_components/hon/translations/nl.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Programma" + }, + "programs_wc": { + "state": { + "iot_champagne": "Champagne", + "iot_dessert": "Dessert", + "iot_fortified": "Gestructureerd", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Rood", + "sparkling": "Mousserend", + "white": "Wit" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Wijnkelder", + "state": { + "iot_champagne": "Champagne", + "iot_dessert": "Dessert", + "iot_fortified": "Gestructureerd", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Rood", + "sparkling": "Mousserend", + "white": "Wit" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/pl.json b/custom_components/hon/translations/pl.json index a757390..97e76a4 100644 --- a/custom_components/hon/translations/pl.json +++ b/custom_components/hon/translations/pl.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Program" + }, + "programs_wc": { + "state": { + "iot_champagne": "Szampan", + "iot_dessert": "Deser", + "iot_fortified": "Struktura", + "iot_rose": "Różowe", + "iot_whisky": "Whisky", + "red": "Czerwony", + "sparkling": "Musujące", + "white": "Białe" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Piwniczka z winami", + "state": { + "iot_champagne": "Szampan", + "iot_dessert": "Deser", + "iot_fortified": "Struktura", + "iot_rose": "Różowe", + "iot_whisky": "Whisky", + "red": "Czerwony", + "sparkling": "Musujące", + "white": "Białe" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/pt.json b/custom_components/hon/translations/pt.json index 1e68672..c941c8d 100644 --- a/custom_components/hon/translations/pt.json +++ b/custom_components/hon/translations/pt.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Programa" + }, + "programs_wc": { + "state": { + "iot_champagne": "Champanhe", + "iot_dessert": "Digestivo", + "iot_fortified": "Encorpado", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Vermelho", + "sparkling": "Espumante", + "white": "Branco" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Garrafeira", + "state": { + "iot_champagne": "Champanhe", + "iot_dessert": "Digestivo", + "iot_fortified": "Encorpado", + "iot_rose": "Rosé", + "iot_whisky": "Whisky", + "red": "Vermelho", + "sparkling": "Espumante", + "white": "Branco" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/ro.json b/custom_components/hon/translations/ro.json index 8c55275..777e15f 100644 --- a/custom_components/hon/translations/ro.json +++ b/custom_components/hon/translations/ro.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Program" + }, + "programs_wc": { + "state": { + "iot_champagne": "Șampanie", + "iot_dessert": "Desert", + "iot_fortified": "Structurat", + "iot_rose": "Roze", + "iot_whisky": "Whisky", + "red": "Roșu", + "sparkling": "Spumant", + "white": "Alb" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Cramă", + "state": { + "iot_champagne": "Șampanie", + "iot_dessert": "Desert", + "iot_fortified": "Structurat", + "iot_rose": "Roze", + "iot_whisky": "Whisky", + "red": "Roșu", + "sparkling": "Spumant", + "white": "Alb" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/ru.json b/custom_components/hon/translations/ru.json index 334f94d..d37f928 100644 --- a/custom_components/hon/translations/ru.json +++ b/custom_components/hon/translations/ru.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Программа" + }, + "programs_wc": { + "state": { + "iot_champagne": "Шампанское", + "iot_dessert": "Десертное", + "iot_fortified": "Структурированное", + "iot_rose": "Розовое", + "iot_whisky": "Виски", + "red": "Красное", + "sparkling": "Игристое", + "white": "Белое" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Винный шкаф", + "state": { + "iot_champagne": "Шампанское", + "iot_dessert": "Десертное", + "iot_fortified": "Структурированное", + "iot_rose": "Розовое", + "iot_whisky": "Виски", + "red": "Красное", + "sparkling": "Игристое", + "white": "Белое" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/sk.json b/custom_components/hon/translations/sk.json index 7828e6b..ff073c1 100644 --- a/custom_components/hon/translations/sk.json +++ b/custom_components/hon/translations/sk.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Program" + }, + "programs_wc": { + "state": { + "iot_champagne": "Šampanské", + "iot_dessert": "Dezertné", + "iot_fortified": "Štruktúrované", + "iot_rose": "Ružové", + "iot_whisky": "Whisky", + "red": "Červené", + "sparkling": "Šumivé", + "white": "Biele" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Vinotéka", + "state": { + "iot_champagne": "Šampanské", + "iot_dessert": "Dezertné", + "iot_fortified": "Štruktúrované", + "iot_rose": "Ružové", + "iot_whisky": "Whisky", + "red": "Červené", + "sparkling": "Šumivé", + "white": "Biele" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/sl.json b/custom_components/hon/translations/sl.json index e0b5fff..dda46b7 100644 --- a/custom_components/hon/translations/sl.json +++ b/custom_components/hon/translations/sl.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Program" + }, + "programs_wc": { + "state": { + "iot_champagne": "Šampanjec", + "iot_dessert": "Sladica", + "iot_fortified": "Strukturirano", + "iot_rose": "Rose", + "iot_whisky": "Viski", + "red": "Rdeče", + "sparkling": "Peneče vino", + "white": "Belo" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Vinska klet", + "state": { + "iot_champagne": "Šampanjec", + "iot_dessert": "Sladica", + "iot_fortified": "Strukturirano", + "iot_rose": "Rose", + "iot_whisky": "Viski", + "red": "Rdeče", + "sparkling": "Peneče vino", + "white": "Belo" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/sr.json b/custom_components/hon/translations/sr.json index 7faaece..1bddfc8 100644 --- a/custom_components/hon/translations/sr.json +++ b/custom_components/hon/translations/sr.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Program" + }, + "programs_wc": { + "state": { + "iot_champagne": "Šampanjac", + "iot_dessert": "Desert", + "iot_fortified": "Strukturisano", + "iot_rose": "Rosé", + "iot_whisky": "Viski", + "red": "Crvena", + "sparkling": "Penušavo", + "white": "Belo" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Vinska vitrina", + "state": { + "iot_champagne": "Šampanjac", + "iot_dessert": "Desert", + "iot_fortified": "Strukturisano", + "iot_rose": "Rosé", + "iot_whisky": "Viski", + "red": "Crvena", + "sparkling": "Penušavo", + "white": "Belo" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/tr.json b/custom_components/hon/translations/tr.json index 1c80588..d005f13 100644 --- a/custom_components/hon/translations/tr.json +++ b/custom_components/hon/translations/tr.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "Program" + }, + "programs_wc": { + "state": { + "iot_champagne": "Şampanya", + "iot_dessert": "Tatlı", + "iot_fortified": "Gövdeli", + "iot_rose": "Roze", + "iot_whisky": "Viski", + "red": "Kırmızı", + "sparkling": "Köpüklü", + "white": "Beyaz" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "Şarap Mahzeni", + "state": { + "iot_champagne": "Şampanya", + "iot_dessert": "Tatlı", + "iot_fortified": "Gövdeli", + "iot_rose": "Roze", + "iot_whisky": "Viski", + "red": "Kırmızı", + "sparkling": "Köpüklü", + "white": "Beyaz" + } + } + } } }, "fan": { diff --git a/custom_components/hon/translations/zh.json b/custom_components/hon/translations/zh.json index 199f7ff..46cd8e3 100644 --- a/custom_components/hon/translations/zh.json +++ b/custom_components/hon/translations/zh.json @@ -877,6 +877,18 @@ "zero_fresh": "0° Fresh" }, "name": "程序" + }, + "programs_wc": { + "state": { + "iot_champagne": "香槟", + "iot_dessert": "甜点", + "iot_fortified": "结构化", + "iot_rose": "桃红", + "iot_whisky": "威士忌", + "red": "红", + "sparkling": "起泡酒", + "white": "白葡萄酒" + } } }, "select": { @@ -1978,6 +1990,23 @@ } } } + }, + "wine": { + "state_attributes": { + "preset_mode": { + "name": "酒窖", + "state": { + "iot_champagne": "香槟", + "iot_dessert": "甜点", + "iot_fortified": "结构化", + "iot_rose": "桃红", + "iot_whisky": "威士忌", + "red": "红", + "sparkling": "起泡酒", + "white": "白葡萄酒" + } + } + } } }, "fan": { diff --git a/info.md b/info.md index 88d50e8..8e58f8c 100644 --- a/info.md +++ b/info.md @@ -14,6 +14,7 @@ Support for home appliances of Haier's mobile app hOn. - [Fridge](https://github.com/Andre0512/hon#fridge) - [Hob](https://github.com/Andre0512/hon#hob) [BETA] - [Hood](https://github.com/Andre0512/hon#hood) [BETA] +- [Wine Cellar](https://github.com/Andre0512/hon#wine-cellar) [BETA] ## Configuration diff --git a/scripts/generate_translation.py b/scripts/generate_translation.py index 53d66bc..e84f19f 100755 --- a/scripts/generate_translation.py +++ b/scripts/generate_translation.py @@ -47,6 +47,7 @@ PROGRAMS = { "programs_td": "PROGRAMS.TD", "programs_wm": "PROGRAMS.WM_WD", "programs_ref": "PROGRAMS.REF", + "programs_wc": "PROGRAMS.WC", }, } @@ -78,6 +79,12 @@ CLIMATE = { "state": "PROGRAMS.OV", } }, + "wine": { + "preset_mode": { + "name": "WC.NAME", + "state": "PROGRAMS.WC", + } + }, } NAMES = {