diff --git a/README.md b/README.md index 11ad56d..a97e6cc 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Home Assistant integration for [Haier's mobile app hOn](https://hon-smarthome.co [![Supported Languages](https://img.shields.io/badge/Languages-19-royalblue)](https://github.com/Andre0512/hon#supported-languages) [![Supported Appliances](https://img.shields.io/badge/Appliances-11-forestgreen)](https://github.com/Andre0512/hon#supported-appliances) [![Supported Models](https://img.shields.io/badge/Models-110-yellowgreen)](https://github.com/Andre0512/hon#supported-models) -[![Supported Entities](https://img.shields.io/badge/Entities-315-crimson)](https://github.com/Andre0512/hon#appliance-features) +[![Supported Entities](https://img.shields.io/badge/Entities-317-crimson)](https://github.com/Andre0512/hon#appliance-features) ## Supported Appliances - [Washing Machine](https://github.com/Andre0512/hon#washing-machine) @@ -295,19 +295,13 @@ Don't forget to star the repository if you found it useful! ⭐ | Add Dish | `silverware-fork-knife` | `switch` | `startProgram.addDish` | | Delay time | `timer-plus` | `number` | `startProgram.delayTime` | | Eco Express | `sprout` | `switch` | `startProgram.ecoExpress` | -| Eco Index | `sprout` | `sensor` | `startProgram.ecoIndex` | -| Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | | Extra Dry | `hair-dryer` | `switch` | `startProgram.extraDry` | | Half Load | `fraction-one-half` | `switch` | `startProgram.halfLoad` | | Open Door | `door-open` | `switch` | `startProgram.openDoor` | | Program | | `select` | `startProgram.program` | | Remaining Time | `timer` | `select` | `startProgram.remainingTime` | | Temperature | `thermometer` | `select` | `startProgram.temp` | -| Temperature | `thermometer` | `sensor` | `startProgram.temp` | | Three in One | `numeric-3-box-outline` | `switch` | `startProgram.threeInOne` | -| Time | `timer` | `sensor` | `startProgram.remainingTime` | -| Water Efficiency | `water` | `sensor` | `startProgram.waterEfficiency` | -| Water Saving | `water-percent` | `sensor` | `startProgram.waterSaving` | | Water hard | `water` | `number` | `startProgram.waterHard` | #### Sensors | Name | Icon | Entity | Key | @@ -404,6 +398,8 @@ Don't forget to star the repository if you found it useful! ⭐ | Freezer Temperature | `thermometer` | `number` | `settings.tempSelZ2` | | Fridge | `thermometer` | `climate` | `settings.tempSelZ1` | | Fridge Temperature | `thermometer` | `number` | `settings.tempSelZ1` | +| MyZone | `thermometer` | `climate` | `settings.tempSelZ3` | +| MyZone Temperature | `thermometer` | `number` | `settings.tempSelZ3` | | Program Start | `play` | `button` | `startProgram` | | Program Stop | `stop` | `button` | `stopProgram` | | Super Cool | `snowflake` | `switch` | `quickModeZ1` | @@ -446,11 +442,8 @@ Don't forget to star the repository if you found it useful! ⭐ | Dry Time | | `number` | `startProgram.dryTime` | | Dry Time | `timer` | `select` | `startProgram.dryTimeMM` | | Dry level | `hair-dryer` | `select` | `startProgram.dryLevel` | -| Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | | Program | | `select` | `startProgram.program` | -| Steam Type | `weather-dust` | `sensor` | `steamType` | | Sterilization | `lotion-plus` | `switch` | `startProgram.sterilizationStatus` | -| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadD` | | Temperature level | `thermometer` | `number` | `startProgram.tempLevel` | | Tumbling | `refresh-circle` | `switch` | `startProgram.tumblingStatus` | #### Sensors @@ -512,29 +505,21 @@ Don't forget to star the repository if you found it useful! ⭐ | Dry Time | | `number` | `startProgram.dryTime` | | Dry Time | `timer` | `select` | `startProgram.dryTimeMM` | | Dry level | `hair-dryer` | `select` | `startProgram.dryLevel` | -| Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | | Extra Rinse 1 | `numeric-1-box-multiple-outline` | `switch` | `startProgram.extraRinse1` | | Extra Rinse 2 | `numeric-2-box-multiple-outline` | `switch` | `startProgram.extraRinse2` | | Extra Rinse 3 | `numeric-3-box-multiple-outline` | `switch` | `startProgram.extraRinse3` | | Good Night | `weather-night` | `switch` | `startProgram.goodNight` | | Hygiene | `lotion-plus` | `switch` | `startProgram.hygiene` | | Keep Fresh | `refresh-circle` | `switch` | `startProgram.permanentPressStatus` | -| Liquid Detergent Dose | `cup-water` | `sensor` | `startProgram.liquidDetergentDose` | | Main Wash Time | `clock-start` | `number` | `startProgram.mainWashTime` | -| Powder Detergent Dose | `cup` | `sensor` | `startProgram.powderDetergentDose` | | Prewash | `tshirt-crew` | `switch` | `startProgram.prewash` | | Program | | `select` | `startProgram.program` | -| Remaining Time | `timer` | `sensor` | `startProgram.remainingTime` | | Rinse Iterations | `rotate-right` | `number` | `startProgram.rinseIterations` | | Soak Prewash Selection | `tshirt-crew` | `switch` | `startProgram.haier_SoakPrewashSelection` | | Spin speed | `numeric` | `select` | `startProgram.spinSpeed` | | Stain Type | `liquid-spot` | `select` | `startProgram.extendedStainType` | -| Steam Type | `weather-dust` | `sensor` | `steamType` | | Steam level | `weather-dust` | `select` | `startProgram.steamLevel` | | Sterilization | `lotion-plus` | `switch` | `startProgram.sterilizationStatus` | -| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadW` | -| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadD` | -| Suggested weight | `weight-kilogram` | `sensor` | `startProgram.weight` | | Temperature | `thermometer` | `select` | `startProgram.temp` | | Temperature level | `thermometer` | `number` | `startProgram.tempLevel` | | Tumbling | `refresh-circle` | `switch` | `startProgram.tumblingStatus` | @@ -591,26 +576,20 @@ Don't forget to star the repository if you found it useful! ⭐ | Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` | | Delay Time | `timer-plus` | `number` | `startProgram.delayTime` | | Dirty level | `liquid-spot` | `select` | `startProgram.dirtyLevel` | -| Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | | Extra Rinse 1 | `numeric-1-box-multiple-outline` | `switch` | `startProgram.extraRinse1` | | Extra Rinse 2 | `numeric-2-box-multiple-outline` | `switch` | `startProgram.extraRinse2` | | Extra Rinse 3 | `numeric-3-box-multiple-outline` | `switch` | `startProgram.extraRinse3` | | Good Night | `weather-night` | `switch` | `startProgram.goodNight` | | Hygiene | `lotion-plus` | `switch` | `startProgram.hygiene` | | Keep Fresh | `refresh-circle` | `switch` | `startProgram.permanentPressStatus` | -| Liquid Detergent Dose | `cup-water` | `sensor` | `startProgram.liquidDetergentDose` | | Main Wash Time | `clock-start` | `number` | `startProgram.mainWashTime` | -| Powder Detergent Dose | `cup` | `sensor` | `startProgram.powderDetergentDose` | | Prewash | `tshirt-crew` | `switch` | `startProgram.prewash` | | Program | | `select` | `startProgram.program` | -| Remaining Time | `timer` | `sensor` | `startProgram.remainingTime` | | Rinse Iterations | `rotate-right` | `number` | `startProgram.rinseIterations` | | Soak Prewash Selection | `tshirt-crew` | `switch` | `startProgram.haier_SoakPrewashSelection` | | Spin speed | `numeric` | `select` | `startProgram.spinSpeed` | | Stain Type | `liquid-spot` | `select` | `startProgram.extendedStainType` | | Steam level | `weather-dust` | `select` | `startProgram.steamLevel` | -| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadW` | -| Suggested weight | `weight-kilogram` | `sensor` | `startProgram.weight` | | Temperature | `thermometer` | `select` | `startProgram.temp` | | Water hard | `water` | `number` | `startProgram.waterHard` | | lang | | `number` | `startProgram.lang` | diff --git a/custom_components/hon/climate.py b/custom_components/hon/climate.py index 9b02997..7912eac 100644 --- a/custom_components/hon/climate.py +++ b/custom_components/hon/climate.py @@ -67,6 +67,13 @@ CLIMATES: dict[ icon="mdi:snowflake-thermometer", translation_key="freezer", ), + HonClimateEntityDescription( + key="settings.tempSelZ3", + mode=HVACMode.COOL, + name="MyZone", + icon="mdi:thermometer", + translation_key="my_zone", + ), ), "OV": ( HonClimateEntityDescription( @@ -291,10 +298,6 @@ class HonClimateEntity(HonEntity, ClimateEntity): self._attr_temperature_unit = TEMP_CELSIUS self._set_temperature_bound() - self._attr_supported_features = ( - ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE - ) - self._attr_hvac_modes = [description.mode] if "stopProgram" in device.commands: self._attr_hvac_modes += [HVACMode.OFF] @@ -312,7 +315,14 @@ class HonClimateEntity(HonEntity, ClimateEntity): modes.append(mode) else: modes.append(mode) - self._attr_preset_modes = modes + + if modes: + self._attr_supported_features = ( + ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE + ) + self._attr_preset_modes = modes + else: + self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE self._handle_coordinator_update(update=False) diff --git a/custom_components/hon/number.py b/custom_components/hon/number.py index f357735..7c0e504 100644 --- a/custom_components/hon/number.py +++ b/custom_components/hon/number.py @@ -164,6 +164,13 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { native_unit_of_measurement=UnitOfTemperature.CELSIUS, translation_key="freezer_temp_sel", ), + HonNumberEntityDescription( + key="settings.tempSelZ3", + name="MyZone Temperature", + icon="mdi:thermometer", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + translation_key="my_zone_temp_sel", + ), ), "AP": ( HonNumberEntityDescription( diff --git a/custom_components/hon/translations/cs.json b/custom_components/hon/translations/cs.json index 8a27abb..46fa17b 100644 --- a/custom_components/hon/translations/cs.json +++ b/custom_components/hon/translations/cs.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Difuzér (VYPNOUT)" + }, + "my_zone_temp_sel": { + "name": "Cílová teplota My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/de.json b/custom_components/hon/translations/de.json index 5a626a2..ddbe5d0 100644 --- a/custom_components/hon/translations/de.json +++ b/custom_components/hon/translations/de.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Luftverteiler (AUS)" + }, + "my_zone_temp_sel": { + "name": "Zieltemperatur My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/el.json b/custom_components/hon/translations/el.json index e767bb2..a3665c8 100644 --- a/custom_components/hon/translations/el.json +++ b/custom_components/hon/translations/el.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Μεταδότης διάχυσης (ΑΠΕΝΕΡΓΟΠΟΙΗΣΗ)" + }, + "my_zone_temp_sel": { + "name": "Στοχευμένη θερμοκρασία My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/en.json b/custom_components/hon/translations/en.json index 129c5d0..58cad29 100644 --- a/custom_components/hon/translations/en.json +++ b/custom_components/hon/translations/en.json @@ -2072,6 +2072,9 @@ }, "aroma_time_off": { "name": "Diffuser (OFF)" + }, + "my_zone_temp_sel": { + "name": "Target temperature My Zone" } }, "climate": { @@ -2208,6 +2211,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/es.json b/custom_components/hon/translations/es.json index 167b377..fd6813e 100644 --- a/custom_components/hon/translations/es.json +++ b/custom_components/hon/translations/es.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Difusor (APAGADO)" + }, + "my_zone_temp_sel": { + "name": "Temperatura deseada My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/fr.json b/custom_components/hon/translations/fr.json index c2267a8..85a37a0 100644 --- a/custom_components/hon/translations/fr.json +++ b/custom_components/hon/translations/fr.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Diffuseur (OFF)" + }, + "my_zone_temp_sel": { + "name": "Température cible My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/he.json b/custom_components/hon/translations/he.json index c73387f..5d37c34 100644 --- a/custom_components/hon/translations/he.json +++ b/custom_components/hon/translations/he.json @@ -1108,6 +1108,9 @@ }, "aroma_time_off": { "name": "Diffuser (OFF)" + }, + "my_zone_temp_sel": { + "name": "Target temperature My Zone" } }, "climate": { @@ -1169,6 +1172,9 @@ "state": {} } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/hr.json b/custom_components/hon/translations/hr.json index 8e0d1b2..2f48cd9 100644 --- a/custom_components/hon/translations/hr.json +++ b/custom_components/hon/translations/hr.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Raspršivač (UKLJUČEN)" + }, + "my_zone_temp_sel": { + "name": "Ciljana temperatura My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/it.json b/custom_components/hon/translations/it.json index a69b19e..0b01a0d 100644 --- a/custom_components/hon/translations/it.json +++ b/custom_components/hon/translations/it.json @@ -2052,6 +2052,9 @@ }, "aroma_time_off": { "name": "Diffusore (OFF)" + }, + "my_zone_temp_sel": { + "name": "Temperatura target My Zone" } }, "climate": { @@ -2186,6 +2189,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/nl.json b/custom_components/hon/translations/nl.json index 9a6f314..42c559f 100644 --- a/custom_components/hon/translations/nl.json +++ b/custom_components/hon/translations/nl.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Diffuser (UIT)" + }, + "my_zone_temp_sel": { + "name": "Doeltemperatuur My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/pl.json b/custom_components/hon/translations/pl.json index 373b852..4a651e4 100644 --- a/custom_components/hon/translations/pl.json +++ b/custom_components/hon/translations/pl.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Dyfuzor (WYŁ.)" + }, + "my_zone_temp_sel": { + "name": "Temperatura docelowa My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/pt.json b/custom_components/hon/translations/pt.json index 9282bb5..9b8c62f 100644 --- a/custom_components/hon/translations/pt.json +++ b/custom_components/hon/translations/pt.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Difusor (OFF)" + }, + "my_zone_temp_sel": { + "name": "Temperatura alvo My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/ro.json b/custom_components/hon/translations/ro.json index ca6e7f1..917e0df 100644 --- a/custom_components/hon/translations/ro.json +++ b/custom_components/hon/translations/ro.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Difuzor (OPRIT)" + }, + "my_zone_temp_sel": { + "name": "Temperatură vizată My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/ru.json b/custom_components/hon/translations/ru.json index 99ae650..2ed7761 100644 --- a/custom_components/hon/translations/ru.json +++ b/custom_components/hon/translations/ru.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Распылитель (Выкл.)" + }, + "my_zone_temp_sel": { + "name": "Заданная температура My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/sk.json b/custom_components/hon/translations/sk.json index ac60dcf..b97e612 100644 --- a/custom_components/hon/translations/sk.json +++ b/custom_components/hon/translations/sk.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Difuzér (VYP)" + }, + "my_zone_temp_sel": { + "name": "Cieľová teplota My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/sl.json b/custom_components/hon/translations/sl.json index 5dd5b31..5946c7a 100644 --- a/custom_components/hon/translations/sl.json +++ b/custom_components/hon/translations/sl.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Razpršilnik (IZKLOP)" + }, + "my_zone_temp_sel": { + "name": "Ciljna temperatura My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/sr.json b/custom_components/hon/translations/sr.json index 2e7cff0..3602018 100644 --- a/custom_components/hon/translations/sr.json +++ b/custom_components/hon/translations/sr.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Difuzor (ISKLJUČENO)" + }, + "my_zone_temp_sel": { + "name": "Željena temperatura My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/tr.json b/custom_components/hon/translations/tr.json index 7d9847a..512c5a2 100644 --- a/custom_components/hon/translations/tr.json +++ b/custom_components/hon/translations/tr.json @@ -2043,6 +2043,9 @@ }, "aroma_time_off": { "name": "Difüzör (KAPALI)" + }, + "my_zone_temp_sel": { + "name": "Hedef sıcaklık My Zone" } }, "climate": { @@ -2177,6 +2180,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/custom_components/hon/translations/zh.json b/custom_components/hon/translations/zh.json index dc44e38..e5e22ae 100644 --- a/custom_components/hon/translations/zh.json +++ b/custom_components/hon/translations/zh.json @@ -2029,6 +2029,9 @@ }, "aroma_time_off": { "name": "扩散器(关)" + }, + "my_zone_temp_sel": { + "name": "目标温度 My Zone" } }, "climate": { @@ -2163,6 +2166,9 @@ } } } + }, + "my_zone": { + "name": "My Zone" } }, "fan": { diff --git a/scripts/translation_keys.py b/scripts/translation_keys.py index a1d550b..0eaea52 100644 --- a/scripts/translation_keys.py +++ b/scripts/translation_keys.py @@ -462,6 +462,7 @@ NAMES = { "dry_time": "WASHING_CMD&CTRL.DRAWER_CYCLE_DRYING.TAB_TIME", "freezer_temp_sel": ["OV.COMMON.GOAL_TEMPERATURE", "REF.ZONES.FREEZER"], "fridge_temp_sel": ["OV.COMMON.GOAL_TEMPERATURE", "REF.ZONES.FRIDGE"], + "my_zone_temp_sel": ["OV.COMMON.GOAL_TEMPERATURE", "REF.ZONES.MY_ZONE_1"], "pollen_level": "AP.AIR_QUALITY.POLLEN_LEVEL", "aroma_time_on": "AP.TITLES.AROMA_ON", "aroma_time_off": "AP.TITLES.AROMA_OFF", @@ -471,6 +472,7 @@ NAMES = { "fridge": "REF.ZONES.FRIDGE", "freezer": "REF.ZONES.FREEZER", "oven": "GLOBALS.APPLIANCES_NAME.OV", + "my_zone": "REF.ZONES.MY_ZONE_1", }, "fan": {"air_extraction": "HO.DASHBOARD.AIR_EXTRACTION_TITLE"}, "light": {"light": "WC.DASHBOARD_MENU_MORE.LIGHT"},