Add fresh zone for ref #126

This commit is contained in:
Andre Basche 2023-11-20 17:35:58 +01:00
parent a00b80be95
commit e67b9ff5b1
23 changed files with 141 additions and 29 deletions

View file

@ -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` |

View file

@ -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)
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)

View file

@ -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(

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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": {

View file

@ -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"},