From 81676771c75055eab13ab24df04255b77549bffd Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Mon, 15 May 2023 19:23:53 +0200 Subject: [PATCH] Add some fridge sensors, change some configs to controls --- README.md | 33 ++++++++++------ custom_components/hon/binary_sensor.py | 2 +- custom_components/hon/number.py | 18 ++++++--- custom_components/hon/select.py | 24 +++++++++--- custom_components/hon/sensor.py | 20 +++++++++- custom_components/hon/switch.py | 45 ++++++++++++++-------- custom_components/hon/translations/cs.json | 15 ++++++++ custom_components/hon/translations/de.json | 15 ++++++++ custom_components/hon/translations/el.json | 15 ++++++++ custom_components/hon/translations/en.json | 15 ++++++++ custom_components/hon/translations/es.json | 15 ++++++++ custom_components/hon/translations/fr.json | 15 ++++++++ custom_components/hon/translations/he.json | 15 ++++++++ custom_components/hon/translations/hr.json | 15 ++++++++ custom_components/hon/translations/it.json | 15 ++++++++ custom_components/hon/translations/nl.json | 15 ++++++++ custom_components/hon/translations/pl.json | 15 ++++++++ custom_components/hon/translations/pt.json | 15 ++++++++ custom_components/hon/translations/ro.json | 15 ++++++++ custom_components/hon/translations/ru.json | 15 ++++++++ custom_components/hon/translations/sk.json | 15 ++++++++ custom_components/hon/translations/sl.json | 15 ++++++++ custom_components/hon/translations/sr.json | 15 ++++++++ custom_components/hon/translations/tr.json | 15 ++++++++ custom_components/hon/translations/zh.json | 15 ++++++++ scripts/generate_translation.py | 5 +++ scripts/sensor_docs.py | 1 + 27 files changed, 392 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index f1ffbac..9e2d912 100644 --- a/README.md +++ b/README.md @@ -151,34 +151,37 @@ For every device exists a hidden button which can be used to log all infos of yo #### Controls | Name | Icon | Entity | Key | | --- | --- | --- | --- | -| Air Conditioner | `air-conditioner` | `climate` | `settings` | -#### Configs -| Name | Icon | Entity | Key | -| --- | --- | --- | --- | | 10° Heating | `heat-wave` | `switch` | `settings.10degreeHeatingStatus` | +| Air Conditioner | `air-conditioner` | `climate` | `settings` | | Echo | `account-voice` | `switch` | `settings.echoStatus` | | Eco Mode | | `switch` | `settings.ecoMode` | -| Eco Pilot | `run` | `select` | `settings.humanSensingStatus` | | Health Mode | `medication-outline` | `switch` | `settings.healthMode` | | Mute | `volume-off` | `switch` | `settings.muteStatus` | -| Program | | `select` | `startProgram.program` | | Rapid Mode | `run-fast` | `switch` | `settings.rapidMode` | | Screen Display | `monitor-small` | `switch` | `settings.screenDisplayStatus` | | Self Cleaning | `air-filter` | `switch` | `settings.selfCleaningStatus` | | Self Cleaning 56 | `air-filter` | `switch` | `settings.selfCleaning56Status` | | Silent Sleep | `bed` | `switch` | `settings.silentSleepStatus` | +#### Configs +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Program | | `select` | `startProgram.program` | +#### Sensors +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Eco Pilot | `run` | `select` | `settings.humanSensingStatus` | | Target Temperature | `thermometer` | `number` | `settings.tempSel` | ### Dish washer #### Controls | Name | Icon | Entity | Key | | --- | --- | --- | --- | +| Buzzer Disabled | `volume-off` | `switch` | `settings.buzzerDisabled` | | Dish Washer | `dishwasher` | `switch` | `startProgram` / `stopProgram` | #### Configs | Name | Icon | Entity | Key | | --- | --- | --- | --- | | Add Dish | `silverware-fork-knife` | `switch` | `startProgram.addDish` | -| Buzzer Disabled | `volume-off` | `switch` | `settings.buzzerDisabled` | | Delay time | `timer-plus` | `number` | `startProgram.delayTime` | | Eco Express | `sprout` | `switch` | `startProgram.ecoExpress` | | Eco Index | `sprout` | `sensor` | `startProgram.ecoIndex` | @@ -255,23 +258,31 @@ For every device exists a hidden button which can be used to log all infos of yo | Temperature Selected | `thermometer` | `sensor` | `tempSel` | ### Fridge +#### Controls +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Auto-Set Mode | `thermometer-auto` | `switch` | `settings.intelligenceMode` | +| Super Cool | `snowflake` | `switch` | `settings.quickModeZ2` | +| Super Freeze | `snowflake-variant` | `switch` | `settings.quickModeZ1` | #### Configs | Name | Icon | Entity | Key | | --- | --- | --- | --- | -| Freezer Temperature | `thermometer` | `number` | `settings.tempSelZ2` | -| Fridge Temperature | `thermometer` | `number` | `settings.tempSelZ1` | | Program | | `select` | `startProgram.program` | #### Sensors | Name | Icon | Entity | Key | | --- | --- | --- | --- | -| Auto-Set Mode | `robot-outline` | `binary_sensor` | `intelligenceMode` | +| Auto-Set Mode | `thermometer-auto` | `binary_sensor` | `intelligenceMode` | | Door Status Freezer | `fridge-top` | `binary_sensor` | `doorStatusZ1` | | Door Status Fridge | `fridge-bottom` | `binary_sensor` | `door2StatusZ1` | +| Freezer Temperature | `thermometer` | `number` | `settings.tempSelZ2` | +| Fridge Temperature | `thermometer` | `number` | `settings.tempSelZ1` | | Holiday Mode | `palm-tree` | `binary_sensor` | `holidayMode` | | Room Humidity | `water-percent` | `sensor` | `humidityEnv` | -| Room Temperature | `thermometer` | `sensor` | `tempEnv` | +| Room Temperature | `home-thermometer-outline` | `sensor` | `tempEnv` | | Super Cool | `snowflake` | `binary_sensor` | `quickModeZ2` | | Super Freeze | `snowflake-variant` | `binary_sensor` | `quickModeZ1` | +| Temperature Freezer | `snowflake-thermometer` | `sensor` | `tempZ2` | +| Temperature Fridge | `thermometer` | `sensor` | `tempZ1` | ### Tumble dryer #### Controls diff --git a/custom_components/hon/binary_sensor.py b/custom_components/hon/binary_sensor.py index aad651b..e9d3e0b 100644 --- a/custom_components/hon/binary_sensor.py +++ b/custom_components/hon/binary_sensor.py @@ -215,7 +215,7 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = { HonBinarySensorEntityDescription( key="intelligenceMode", name="Auto-Set Mode", - icon="mdi:robot-outline", + icon="mdi:thermometer-auto", device_class=BinarySensorDeviceClass.RUNNING, on_value="1", translation_key="auto_set", diff --git a/custom_components/hon/number.py b/custom_components/hon/number.py index 3f9d3a2..01aaac7 100644 --- a/custom_components/hon/number.py +++ b/custom_components/hon/number.py @@ -147,7 +147,6 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { NumberEntityDescription( key="settings.tempSel", name="Target Temperature", - entity_category=EntityCategory.CONFIG, icon="mdi:thermometer", native_unit_of_measurement=UnitOfTemperature.CELSIUS, translation_key="target_temperature", @@ -157,7 +156,6 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { NumberEntityDescription( key="settings.tempSelZ1", name="Fridge Temperature", - entity_category=EntityCategory.CONFIG, icon="mdi:thermometer", native_unit_of_measurement=UnitOfTemperature.CELSIUS, translation_key="fridge_temp_sel", @@ -165,7 +163,6 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { NumberEntityDescription( key="settings.tempSelZ2", name="Freezer Temperature", - entity_category=EntityCategory.CONFIG, icon="mdi:thermometer", native_unit_of_measurement=UnitOfTemperature.CELSIUS, translation_key="freezer_temp_sel", @@ -226,8 +223,6 @@ class HonNumberEntity(HonEntity, NumberEntity): setting.value = value if "settings." in self.entity_description.key: await self._device.commands["settings"].send() - elif self._device.appliance_type in ["AC"]: - await self._device.commands["startProgram"].send() await self.coordinator.async_refresh() @callback @@ -239,3 +234,16 @@ class HonNumberEntity(HonEntity, NumberEntity): self._attr_native_step = setting.step self._attr_native_value = setting.value self.async_write_ha_state() + + @property + def available(self) -> bool: + """Return True if entity is available.""" + if self.entity_category == EntityCategory.CONFIG: + return super().available + else: + return ( + super().available + and self._device.get("remoteCtrValid") == "1" + and self._device.get("attributes.lastConnEvent.category") + != "DISCONNECTED" + ) diff --git a/custom_components/hon/select.py b/custom_components/hon/select.py index e136ccf..43b43ed 100644 --- a/custom_components/hon/select.py +++ b/custom_components/hon/select.py @@ -2,15 +2,15 @@ from __future__ import annotations import logging +from pyhon import Hon +from pyhon.appliance import HonAppliance +from pyhon.parameter.fixed import HonParameterFixed + from homeassistant.components.select import SelectEntity, SelectEntityDescription from homeassistant.config_entries import ConfigEntry from homeassistant.const import UnitOfTemperature, UnitOfTime, REVOLUTIONS_PER_MINUTE from homeassistant.core import callback from homeassistant.helpers.entity import EntityCategory -from pyhon import Hon -from pyhon.appliance import HonAppliance -from pyhon.parameter.fixed import HonParameterFixed - from .const import DOMAIN from .hon import HonEntity, HonCoordinator, unique_entities @@ -115,7 +115,6 @@ SELECTS = { key="settings.humanSensingStatus", name="Eco Pilot", icon="mdi:run", - entity_category=EntityCategory.CONFIG, translation_key="eco_pilot", ), ), @@ -168,7 +167,7 @@ class HonSelectEntity(HonEntity, SelectEntity): if not (setting := self._device.settings.get(description.key)): self._attr_options: list[str] = [] elif not isinstance(setting, HonParameterFixed): - self._attr_options: list[str] = setting.value + self._attr_options: list[str] = setting.values else: self._attr_options: list[str] = [setting.value] @@ -199,3 +198,16 @@ class HonSelectEntity(HonEntity, SelectEntity): self._attr_options: list[str] = setting.values self._attr_native_value = setting.value self.async_write_ha_state() + + @property + def available(self) -> bool: + """Return True if entity is available.""" + if self.entity_category == EntityCategory.CONFIG: + return super().available + else: + return ( + super().available + and self._device.get("remoteCtrValid") == "1" + and self._device.get("attributes.lastConnEvent.category") + != "DISCONNECTED" + ) diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index 62bc1a4..14956b6 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -412,12 +412,30 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { SensorEntityDescription( key="tempEnv", name="Room Temperature", - icon="mdi:thermometer", + icon="mdi:home-thermometer-outline", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, translation_key="room_temperature", ), + SensorEntityDescription( + key="tempZ1", + name="Temperature Fridge", + icon="mdi:thermometer", + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + translation_key="fridge_temp", + ), + SensorEntityDescription( + key="tempZ2", + name="Temperature Freezer", + icon="mdi:snowflake-thermometer", + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + translation_key="freezer_temp", + ), ), } SENSORS["WD"] = unique_entities(SENSORS["WM"], SENSORS["TD"]) diff --git a/custom_components/hon/switch.py b/custom_components/hon/switch.py index 494d815..b32ccba 100644 --- a/custom_components/hon/switch.py +++ b/custom_components/hon/switch.py @@ -245,7 +245,6 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { key="settings.buzzerDisabled", name="Buzzer Disabled", icon="mdi:volume-off", - entity_category=EntityCategory.CONFIG, translation_key="buzzer", ), ), @@ -254,69 +253,79 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { key="settings.10degreeHeatingStatus", name="10° Heating", icon="mdi:heat-wave", - entity_category=EntityCategory.CONFIG, translation_key="10_degree_heating", ), HonSwitchEntityDescription( key="settings.echoStatus", name="Echo", icon="mdi:account-voice", - entity_category=EntityCategory.CONFIG, ), HonSwitchEntityDescription( key="settings.ecoMode", name="Eco Mode", - entity_category=EntityCategory.CONFIG, translation_key="eco_mode", ), HonSwitchEntityDescription( key="settings.healthMode", name="Health Mode", icon="mdi:medication-outline", - entity_category=EntityCategory.CONFIG, ), HonSwitchEntityDescription( key="settings.muteStatus", name="Mute", icon="mdi:volume-off", - entity_category=EntityCategory.CONFIG, translation_key="mute_mode", ), HonSwitchEntityDescription( key="settings.rapidMode", name="Rapid Mode", icon="mdi:run-fast", - entity_category=EntityCategory.CONFIG, translation_key="rapid_mode", ), HonSwitchEntityDescription( key="settings.screenDisplayStatus", name="Screen Display", icon="mdi:monitor-small", - entity_category=EntityCategory.CONFIG, ), HonSwitchEntityDescription( key="settings.selfCleaning56Status", name="Self Cleaning 56", icon="mdi:air-filter", - entity_category=EntityCategory.CONFIG, translation_key="self_clean_56", ), HonSwitchEntityDescription( key="settings.selfCleaningStatus", name="Self Cleaning", icon="mdi:air-filter", - entity_category=EntityCategory.CONFIG, translation_key="self_clean", ), HonSwitchEntityDescription( key="settings.silentSleepStatus", name="Silent Sleep", icon="mdi:bed", - entity_category=EntityCategory.CONFIG, translation_key="silent_mode", ), ), + "REF": ( + HonSwitchEntityDescription( + key="settings.intelligenceMode", + name="Auto-Set Mode", + icon="mdi:thermometer-auto", + translation_key="auto_set", + ), + HonSwitchEntityDescription( + key="settings.quickModeZ1", + name="Super Freeze", + icon="mdi:snowflake-variant", + translation_key="super_freeze", + ), + HonSwitchEntityDescription( + key="settings.quickModeZ2", + name="Super Cool", + icon="mdi:snowflake", + translation_key="super_cool", + ), + ), } SWITCHES["WD"] = unique_entities(SWITCHES["WD"], SWITCHES["WM"]) @@ -386,7 +395,10 @@ class HonSwitchEntity(HonEntity, SwitchEntity): return self._device.get(self.entity_description.key, False) async def async_turn_on(self, **kwargs: Any) -> None: - if self.entity_category == EntityCategory.CONFIG: + if ( + self.entity_category == EntityCategory.CONFIG + or "settings." in self.entity_description.key + ): setting = self._device.settings[self.entity_description.key] setting.value = ( setting.max if isinstance(setting, HonParameterRange) else "1" @@ -394,14 +406,15 @@ class HonSwitchEntity(HonEntity, SwitchEntity): self.async_write_ha_state() if "settings." in self.entity_description.key: await self._device.commands["settings"].send() - elif self._device.appliance_type in ["AC"]: - await self._device.commands["startProgram"].send() await self.coordinator.async_refresh() else: await self._device.commands[self.entity_description.turn_on_key].send() async def async_turn_off(self, **kwargs: Any) -> None: - if self.entity_category == EntityCategory.CONFIG: + if ( + self.entity_category == EntityCategory.CONFIG + or "settings." in self.entity_description.key + ): setting = self._device.settings[self.entity_description.key] setting.value = ( setting.min if isinstance(setting, HonParameterRange) else "0" @@ -409,8 +422,6 @@ class HonSwitchEntity(HonEntity, SwitchEntity): self.async_write_ha_state() if "settings." in self.entity_description.key: await self._device.commands["settings"].send() - elif self._device.appliance_type in ["AC"]: - await self._device.commands["startProgram"].send() await self.coordinator.async_refresh() else: await self._device.commands[self.entity_description.turn_off_key].send() diff --git a/custom_components/hon/translations/cs.json b/custom_components/hon/translations/cs.json index 2f3fc35..45c7584 100644 --- a/custom_components/hon/translations/cs.json +++ b/custom_components/hon/translations/cs.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Vlhkost" + }, + "freezer_temp": { + "name": "Teplota mrazničky" + }, + "fridge_temp": { + "name": "Teplota chladničky" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Automatické dávkování Prací prostředek" + }, + "auto_set": { + "name": "Automatické nastavení" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/de.json b/custom_components/hon/translations/de.json index bcf3ca3..227cb6d 100644 --- a/custom_components/hon/translations/de.json +++ b/custom_components/hon/translations/de.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Luftfeuchtigkeit" + }, + "freezer_temp": { + "name": "Gefrierschrank-Temperatur" + }, + "fridge_temp": { + "name": "Temperatur des Kühlschranks" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Autodosierung Spülmittel" + }, + "auto_set": { + "name": "Auto-Set" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/el.json b/custom_components/hon/translations/el.json index a63b37d..43ae6ea 100644 --- a/custom_components/hon/translations/el.json +++ b/custom_components/hon/translations/el.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Υγρασία" + }, + "freezer_temp": { + "name": "Θερμοκρασία καταψύκτη" + }, + "fridge_temp": { + "name": "Θερμοκρασία ψυγείου" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Αυτόματη Δοσολογία Απορρυπαντικό" + }, + "auto_set": { + "name": "Αυτόματη ρύθμιση" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/en.json b/custom_components/hon/translations/en.json index 981e064..632fd4d 100644 --- a/custom_components/hon/translations/en.json +++ b/custom_components/hon/translations/en.json @@ -372,6 +372,12 @@ }, "humidity": { "name": "Humidity" + }, + "freezer_temp": { + "name": "Freezer temperature" + }, + "fridge_temp": { + "name": "Fridge temperature" } }, "switch": { @@ -470,6 +476,15 @@ }, "auto_dose_detergent": { "name": "Autodose Detergent" + }, + "auto_set": { + "name": "Auto-Set" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "select": { diff --git a/custom_components/hon/translations/es.json b/custom_components/hon/translations/es.json index 9b5646c..6a75256 100644 --- a/custom_components/hon/translations/es.json +++ b/custom_components/hon/translations/es.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Humedad" + }, + "freezer_temp": { + "name": "Temperatura del congelador" + }, + "fridge_temp": { + "name": "Temperatura del frigorífico" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Dosificación automática Detergente" + }, + "auto_set": { + "name": "Auto-Set" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/fr.json b/custom_components/hon/translations/fr.json index dd26ebc..f296121 100644 --- a/custom_components/hon/translations/fr.json +++ b/custom_components/hon/translations/fr.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Humidité" + }, + "freezer_temp": { + "name": "Température du congélateur" + }, + "fridge_temp": { + "name": "Température du réfrigérateur" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Dose automatique Lessive" + }, + "auto_set": { + "name": "Réglage automatique" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/he.json b/custom_components/hon/translations/he.json index 07ee09d..b4c1d85 100644 --- a/custom_components/hon/translations/he.json +++ b/custom_components/hon/translations/he.json @@ -194,6 +194,12 @@ }, "humidity": { "name": "Humidity" + }, + "freezer_temp": { + "name": "Freezer temperature" + }, + "fridge_temp": { + "name": "Fridge temperature" } }, "select": { @@ -595,6 +601,15 @@ }, "auto_dose_detergent": { "name": "מינון אוטומטי חומר ניקוי" + }, + "auto_set": { + "name": "Auto-Set" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/hr.json b/custom_components/hon/translations/hr.json index 8df62bb..3bcaf38 100644 --- a/custom_components/hon/translations/hr.json +++ b/custom_components/hon/translations/hr.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Vlažnost" + }, + "freezer_temp": { + "name": "Temperatura zamrzivača" + }, + "fridge_temp": { + "name": "Temperatura hladnjaka" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Automatsko doziranje Deterdžent" + }, + "auto_set": { + "name": "Automatsko postavljanje" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/it.json b/custom_components/hon/translations/it.json index 7e23e09..93d6a54 100644 --- a/custom_components/hon/translations/it.json +++ b/custom_components/hon/translations/it.json @@ -365,6 +365,12 @@ }, "humidity": { "name": "Umidità" + }, + "freezer_temp": { + "name": "Temperatura del congelatore" + }, + "fridge_temp": { + "name": "Temperatura del frigorifero" } }, "select": { @@ -1194,6 +1200,15 @@ }, "auto_dose_detergent": { "name": "Autodose Detergente" + }, + "auto_set": { + "name": "Impostazione automatica" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/nl.json b/custom_components/hon/translations/nl.json index fb59800..da1e42e 100644 --- a/custom_components/hon/translations/nl.json +++ b/custom_components/hon/translations/nl.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Luchtvochtigheid" + }, + "freezer_temp": { + "name": "Vriezertemperatuur" + }, + "fridge_temp": { + "name": "Koelkasttemperatuur" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Automatisch doseren Wasmiddel" + }, + "auto_set": { + "name": "Automatisch instellen" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/pl.json b/custom_components/hon/translations/pl.json index 1f99cc2..e709445 100644 --- a/custom_components/hon/translations/pl.json +++ b/custom_components/hon/translations/pl.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Wilgotność" + }, + "freezer_temp": { + "name": "Temperatura zamrażarki" + }, + "fridge_temp": { + "name": "Temperatura lodówki" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Automatyczne dozowanie Detergent" + }, + "auto_set": { + "name": "Ustawianie automatyczne" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/pt.json b/custom_components/hon/translations/pt.json index c38ea95..3bdd0a7 100644 --- a/custom_components/hon/translations/pt.json +++ b/custom_components/hon/translations/pt.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Humidade" + }, + "freezer_temp": { + "name": "Temperatura do congelador" + }, + "fridge_temp": { + "name": "Temperatura do frigorífico" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Autodosagem Detergente" + }, + "auto_set": { + "name": "Ajuste automático" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/ro.json b/custom_components/hon/translations/ro.json index d8c3c7b..af0b9a6 100644 --- a/custom_components/hon/translations/ro.json +++ b/custom_components/hon/translations/ro.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Umiditate" + }, + "freezer_temp": { + "name": "Temperatura congelatorului" + }, + "fridge_temp": { + "name": "Temperatura frigiderului" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Autodozare Detergent" + }, + "auto_set": { + "name": "Setare automată" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/ru.json b/custom_components/hon/translations/ru.json index 3c9e3e5..78b9c58 100644 --- a/custom_components/hon/translations/ru.json +++ b/custom_components/hon/translations/ru.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Влажность" + }, + "freezer_temp": { + "name": "Температура в морозильном отделении" + }, + "fridge_temp": { + "name": "Температура в холодильнике" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Автодозирование Средство для стирки" + }, + "auto_set": { + "name": "Автоматическая установка" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/sk.json b/custom_components/hon/translations/sk.json index 2e8aaa5..584ad91 100644 --- a/custom_components/hon/translations/sk.json +++ b/custom_components/hon/translations/sk.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Vlhkosť" + }, + "freezer_temp": { + "name": "Teplota mrazničky" + }, + "fridge_temp": { + "name": "Teplota chladničky" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Automatická dávka Prací prostriedok" + }, + "auto_set": { + "name": "Automatické nastavenie" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/sl.json b/custom_components/hon/translations/sl.json index 33b6dc7..49369f3 100644 --- a/custom_components/hon/translations/sl.json +++ b/custom_components/hon/translations/sl.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Vlaga " + }, + "freezer_temp": { + "name": "Temperatura zamrzovalnika" + }, + "fridge_temp": { + "name": "Temperatura hladilnika" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Samodejno odmerjanje Detergent" + }, + "auto_set": { + "name": "Samodejna nastavitev" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/sr.json b/custom_components/hon/translations/sr.json index 15c382d..527189a 100644 --- a/custom_components/hon/translations/sr.json +++ b/custom_components/hon/translations/sr.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Vlažnost" + }, + "freezer_temp": { + "name": "Temperatura zamrzivača" + }, + "fridge_temp": { + "name": "Temperatura frižidera" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Automatsko doziranje Deterdžent" + }, + "auto_set": { + "name": "Automatsko podešavanje" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/tr.json b/custom_components/hon/translations/tr.json index 132a60e..f984169 100644 --- a/custom_components/hon/translations/tr.json +++ b/custom_components/hon/translations/tr.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "Nem" + }, + "freezer_temp": { + "name": "Dondurucu sıcaklığı" + }, + "fridge_temp": { + "name": "Buzdolabı sıcaklığı" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "Otomatik doz Deterjan" + }, + "auto_set": { + "name": "Otomatik Ayarla" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/custom_components/hon/translations/zh.json b/custom_components/hon/translations/zh.json index 842186b..afc50dd 100644 --- a/custom_components/hon/translations/zh.json +++ b/custom_components/hon/translations/zh.json @@ -313,6 +313,12 @@ }, "humidity": { "name": "湿度" + }, + "freezer_temp": { + "name": "冷藏室温度" + }, + "fridge_temp": { + "name": "冰箱温度" } }, "select": { @@ -1142,6 +1148,15 @@ }, "auto_dose_detergent": { "name": "自动定量 洗涤剂" + }, + "auto_set": { + "name": "自动设置" + }, + "super_cool": { + "name": "Super Cool" + }, + "super_freeze": { + "name": "Super Freeze" } }, "binary_sensor": { diff --git a/scripts/generate_translation.py b/scripts/generate_translation.py index 973a4e3..08465ab 100755 --- a/scripts/generate_translation.py +++ b/scripts/generate_translation.py @@ -82,6 +82,9 @@ NAMES = { "WASHING_CMD&CTRL.DASHBOARD_MENU_MORE_SETTINGS_WATER.DETERGENT", ], "good_night": "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_OTHER_OPTIONS.GOODNIGHT", + "auto_set": "REF_CMD&CTRL.MODALITIES.ECO", + "super_cool": "REF_CMD&CTRL.MODALITIES.SUPER_COOL", + "super_freeze": "REF_CMD&CTRL.MODALITIES.SUPER_FREEZE", }, "binary_sensor": { "door_lock": "WASHING_CMD&CTRL.CHECK_UP_RESULTS.DOOR_LOCK", @@ -171,6 +174,8 @@ NAMES = { "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_RESULT.WATER_EFFICIENCY", "CUBE90_GLOBAL.GENERAL.CURRENT", ], + "freezer_temp": "REF_CMD&CTRL.TEMPERATURE_DRAWER_FREEZER.FREEZER_TEMPERATURE_TITLE", + "fridge_temp": "REF_CMD&CTRL.TEMPERATURE_DRAWER_FRIDGE.FRIDGE_TEMPERATURE_TITLE", }, "number": { "power_management": "HINTS.COOKING_WITH_INDUCTION.POWER_MANAGEMENT", diff --git a/scripts/sensor_docs.py b/scripts/sensor_docs.py index 6514edd..f13345c 100755 --- a/scripts/sensor_docs.py +++ b/scripts/sensor_docs.py @@ -53,6 +53,7 @@ for entity_type, appliances in entities.items(): if ( isinstance(entity, HonSwitchEntityDescription) and entity.entity_category != "config" + and "settings." not in entity.key ): key = f"{entity.turn_on_key}` / `{entity.turn_off_key}" else: