From 5bff5d214314b74099eeb04c1c4969824e5a4f79 Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Mon, 24 Apr 2023 21:38:05 +0200 Subject: [PATCH] Add more translation keys --- README.md | 330 ++++++++++----------- custom_components/hon/binary_sensor.py | 6 +- custom_components/hon/sensor.py | 15 +- custom_components/hon/switch.py | 1 + custom_components/hon/translations/bg.json | 2 +- custom_components/hon/translations/cs.json | 33 +++ custom_components/hon/translations/de.json | 33 +++ custom_components/hon/translations/el.json | 33 +++ custom_components/hon/translations/en.json | 35 ++- custom_components/hon/translations/es.json | 33 +++ custom_components/hon/translations/fr.json | 33 +++ custom_components/hon/translations/he.json | 33 +++ custom_components/hon/translations/hr.json | 33 +++ custom_components/hon/translations/it.json | 35 ++- custom_components/hon/translations/nl.json | 33 +++ custom_components/hon/translations/pl.json | 33 +++ custom_components/hon/translations/pt.json | 33 +++ custom_components/hon/translations/ro.json | 33 +++ custom_components/hon/translations/ru.json | 33 +++ custom_components/hon/translations/sk.json | 33 +++ custom_components/hon/translations/sl.json | 33 +++ custom_components/hon/translations/sr.json | 33 +++ custom_components/hon/translations/tr.json | 33 +++ custom_components/hon/translations/zh.json | 33 +++ scripts/generate_translation.py | 30 ++ scripts/sensor_docs.py | 14 +- 26 files changed, 845 insertions(+), 184 deletions(-) diff --git a/README.md b/README.md index dfcb877..3d6bc30 100644 --- a/README.md +++ b/README.md @@ -134,195 +134,195 @@ I moved the api related stuff into the package [pyhOn](https://github.com/Andre0 ### Dish washer #### Controls -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Dish Washer | `dishwasher` | `switch` | `startProgram` / `stopProgram` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Dish Washer | `dishwasher` | `switch` | `startProgram` / `stopProgram` | #### Configs -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| 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` | ✔ | -| 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` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| 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` | +| 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 | Auto-Translation | -| --- | --- | --- | --- | --- | -| Connection | | `binary_sensor` | `attributes.lastConnEvent.category` | ✔ | -| Door | | `binary_sensor` | `doorStatus` | ✔ | -| Error | `math-log` | `sensor` | `errors` | ✔ | -| Machine Status | `information` | `sensor` | `machMode` | ✔ | -| Program Phase | `washing-machine` | `sensor` | `prPhase` | ✔ | -| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | ✔ | -| Rinse Aid | `spray-bottle` | `binary_sensor` | `rinseAidStatus` | ✔ | -| Salt | `shaker-outline` | `binary_sensor` | `saltStatus` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Connection | | `binary_sensor` | `attributes.lastConnEvent.category` | +| Door | | `binary_sensor` | `doorStatus` | +| Error | `math-log` | `sensor` | `errors` | +| Machine Status | `information` | `sensor` | `machMode` | +| Program Phase | `washing-machine` | `sensor` | `prPhase` | +| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | +| Rinse Aid | `spray-bottle` | `binary_sensor` | `rinseAidStatus` | +| Salt | `shaker-outline` | `binary_sensor` | `saltStatus` | ### Hob #### Controls -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Start Program | `pot-steam` | `button` | `startProgram` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Start Program | `pot-steam` | `button` | `startProgram` | #### Configs -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Power Management | `timelapse` | `number` | `startProgram.powerManagement` | ✔ | -| Program | | `select` | `startProgram.program` | ✔ | -| Temperature | `thermometer` | `number` | `startProgram.temp` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Power Management | `timelapse` | `number` | `startProgram.powerManagement` | +| Program | | `select` | `startProgram.program` | +| Temperature | `thermometer` | `number` | `startProgram.temp` | #### Sensors -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Connection | `wifi` | `binary_sensor` | `attributes.lastConnEvent.category` | ✔ | -| Error | `math-log` | `sensor` | `errors` | ❌ | -| Hob Lock | | `binary_sensor` | `hobLockStatus` | ❌ | -| Hot Status | | `binary_sensor` | `hotStatus` | ✔ | -| On | `power-cycle` | `binary_sensor` | `attributes.parameters.onOffStatus` | ❌ | -| Pan Status | `pot-mix` | `binary_sensor` | `panStatus` | ✔ | -| Power | `lightning-bolt` | `sensor` | `power` | ✔ | -| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | ✔ | -| Remote Control | `remote` | `binary_sensor` | `attributes.parameters.remoteCtrValid` | ✔ | -| Temperature | `thermometer` | `sensor` | `temp` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Connection | `wifi` | `binary_sensor` | `attributes.lastConnEvent.category` | +| Error | `math-log` | `sensor` | `errors` | +| Hob Lock | | `binary_sensor` | `hobLockStatus` | +| Hot Status | | `binary_sensor` | `hotStatus` | +| On | `power-cycle` | `binary_sensor` | `attributes.parameters.onOffStatus` | +| Pan Status | `pot-mix` | `binary_sensor` | `panStatus` | +| Power | `lightning-bolt` | `sensor` | `power` | +| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | +| Remote Control | `remote` | `binary_sensor` | `attributes.parameters.remoteCtrValid` | +| Temperature | `thermometer` | `sensor` | `temp` | ### Oven #### Controls -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Oven | `toaster-oven` | `switch` | `startProgram` / `stopProgram` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Oven | `toaster-oven` | `switch` | `startProgram` / `stopProgram` | #### Configs -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Delay time | `timer-plus` | `number` | `startProgram.delayTime` | ✔ | -| Preheat | `thermometer-chevron-up` | `switch` | `startProgram.preheatStatus` | ✔ | -| Program | | `select` | `startProgram.program` | ✔ | -| Program Duration | `timelapse` | `number` | `startProgram.prTime` | ✔ | -| Target Temperature | `thermometer` | `number` | `startProgram.tempSel` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Delay time | `timer-plus` | `number` | `startProgram.delayTime` | +| Preheat | `thermometer-chevron-up` | `switch` | `startProgram.preheatStatus` | +| Program | | `select` | `startProgram.program` | +| Program Duration | `timelapse` | `number` | `startProgram.prTime` | +| Target Temperature | `thermometer` | `number` | `startProgram.tempSel` | #### Sensors -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Connection | `wifi` | `binary_sensor` | `attributes.lastConnEvent.category` | ✔ | -| On | `power-cycle` | `binary_sensor` | `attributes.parameters.onOffStatus` | ❌ | -| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | ✔ | -| Remote Control | `remote` | `binary_sensor` | `attributes.parameters.remoteCtrValid` | ✔ | -| Start Time | `clock-start` | `sensor` | `delayTime` | ✔ | -| Temperature | `thermometer` | `sensor` | `temp` | ✔ | -| Temperature Selected | `thermometer` | `sensor` | `tempSel` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Connection | `wifi` | `binary_sensor` | `attributes.lastConnEvent.category` | +| On | `power-cycle` | `binary_sensor` | `attributes.parameters.onOffStatus` | +| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | +| Remote Control | `remote` | `binary_sensor` | `attributes.parameters.remoteCtrValid` | +| Start Time | `clock-start` | `sensor` | `delayTime` | +| Temperature | `thermometer` | `sensor` | `temp` | +| Temperature Selected | `thermometer` | `sensor` | `tempSel` | ### Tumble dryer #### Controls -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Pause Tumble Dryer | `pause` | `switch` | `pauseProgram` / `resumeProgram` | ✔ | -| Tumble Dryer | `tumble-dryer` | `switch` | `startProgram` / `stopProgram` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Pause Tumble Dryer | `pause` | `switch` | `pauseProgram` / `resumeProgram` | +| Tumble Dryer | `tumble-dryer` | `switch` | `startProgram` / `stopProgram` | #### Configs -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Anti-Crease | `timer` | `switch` | `startProgram.antiCreaseTime` | ✔ | -| Anti-Crease | `timer` | `switch` | `startProgram.anticrease` | ✔ | -| Delay time | `timer-plus` | `number` | `startProgram.delayTime` | ✔ | -| 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` | ✔ | -| Sterilization | `clock-start` | `switch` | `startProgram.sterilizationStatus` | ❌ | -| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadD` | ✔ | -| Temperature level | `thermometer` | `number` | `startProgram.tempLevel` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Anti-Crease | `timer` | `switch` | `startProgram.antiCreaseTime` | +| Anti-Crease | `timer` | `switch` | `startProgram.anticrease` | +| Delay time | `timer-plus` | `number` | `startProgram.delayTime` | +| 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` | +| Sterilization | `clock-start` | `switch` | `startProgram.sterilizationStatus` | +| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadD` | +| Temperature level | `thermometer` | `number` | `startProgram.tempLevel` | #### Sensors -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Connection | | `binary_sensor` | `attributes.lastConnEvent.category` | ✔ | -| Door | | `binary_sensor` | `doorStatus` | ✔ | -| Dry level | `hair-dryer` | `sensor` | `dryLevel` | ✔ | -| Error | `math-log` | `sensor` | `errors` | ✔ | -| Machine Status | `information` | `sensor` | `machMode` | ✔ | -| Program | `tumble-dryer` | `sensor` | `prCode` | ✔ | -| Program Phase | `washing-machine` | `sensor` | `prPhase` | ✔ | -| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | ✔ | -| Start Time | `clock-start` | `sensor` | `delayTime` | ✔ | -| Temperature level | `thermometer` | `sensor` | `tempLevel` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Connection | | `binary_sensor` | `attributes.lastConnEvent.category` | +| Door | | `binary_sensor` | `doorStatus` | +| Dry level | `hair-dryer` | `sensor` | `dryLevel` | +| Error | `math-log` | `sensor` | `errors` | +| Machine Status | `information` | `sensor` | `machMode` | +| Program | `tumble-dryer` | `sensor` | `prCode` | +| Program Phase | `washing-machine` | `sensor` | `prPhase` | +| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | +| Start Time | `clock-start` | `sensor` | `delayTime` | +| Temperature level | `thermometer` | `sensor` | `tempLevel` | ### Washer dryer #### Controls -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Pause Washing Machine | `pause` | `switch` | `pauseProgram` / `resumeProgram` | ✔ | -| Washing Machine | `washing-machine` | `switch` | `startProgram` / `stopProgram` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Pause Washing Machine | `pause` | `switch` | `pauseProgram` / `resumeProgram` | +| Washing Machine | `washing-machine` | `switch` | `startProgram` / `stopProgram` | #### Configs -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Delay Time | `timer-plus` | `number` | `startProgram.delayTime` | ✔ | -| Program | | `select` | `startProgram.program` | ✔ | -| Suggested weight | `weight-kilogram` | `sensor` | `startProgram.weight` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Delay Time | `timer-plus` | `number` | `startProgram.delayTime` | +| Program | | `select` | `startProgram.program` | +| Suggested weight | `weight-kilogram` | `sensor` | `startProgram.weight` | #### Sensors -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Acqua Plus | | `binary_sensor` | `acquaplus` | ✔ | -| Anti-Crease | | `binary_sensor` | `anticrease` | ✔ | -| Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | ❌ | -| Current Program | `tumble-dryer` | `sensor` | `prCode` | ❌ | -| Current Temperature | `thermometer` | `sensor` | `temp` | ✔ | -| Current Water Used | `water` | `sensor` | `currentWaterUsed` | ❌ | -| Dirt level | `liquid-spot` | `sensor` | `dirtyLevel` | ✔ | -| Dry level | `hair-dryer` | `sensor` | `dryLevel` | ✔ | -| Extra Rinse 1 | | `binary_sensor` | `extraRinse1` | ✔ | -| Extra Rinse 2 | | `binary_sensor` | `extraRinse2` | ✔ | -| Extra Rinse 3 | | `binary_sensor` | `extraRinse3` | ✔ | -| Good Night Mode | | `binary_sensor` | `goodNight` | ✔ | -| Machine Status | `information` | `sensor` | `machMode` | ✔ | -| Pre Wash | | `binary_sensor` | `startProgram.prewash` | ❌ | -| Program Phase | `washing-machine` | `sensor` | `prPhase` | ✔ | -| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | ✔ | -| Remote Control | `remote` | `binary_sensor` | `attributes.lastConnEvent.category` | ✔ | -| Spin Speed | `fast-forward-outline` | `sensor` | `spinSpeed` | ✔ | -| Steam level | `smoke` | `sensor` | `steamLevel` | ✔ | -| Total Power | | `sensor` | `totalElectricityUsed` | ❌ | -| Total Wash Cycle | `counter` | `sensor` | `totalWashCycle` | ❌ | -| Total Water | | `sensor` | `totalWaterUsed` | ❌ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Acqua Plus | | `binary_sensor` | `acquaplus` | +| Anti-Crease | | `binary_sensor` | `anticrease` | +| Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | +| Current Program | `tumble-dryer` | `sensor` | `prCode` | +| Current Temperature | `thermometer` | `sensor` | `temp` | +| Current Water Used | `water` | `sensor` | `currentWaterUsed` | +| Dirt level | `liquid-spot` | `sensor` | `dirtyLevel` | +| Dry level | `hair-dryer` | `sensor` | `dryLevel` | +| Extra Rinse 1 | | `binary_sensor` | `extraRinse1` | +| Extra Rinse 2 | | `binary_sensor` | `extraRinse2` | +| Extra Rinse 3 | | `binary_sensor` | `extraRinse3` | +| Good Night Mode | | `binary_sensor` | `goodNight` | +| Machine Status | `information` | `sensor` | `machMode` | +| Pre Wash | | `binary_sensor` | `startProgram.prewash` | +| Program Phase | `washing-machine` | `sensor` | `prPhase` | +| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | +| Remote Control | `remote` | `binary_sensor` | `attributes.lastConnEvent.category` | +| Spin Speed | `fast-forward-outline` | `sensor` | `spinSpeed` | +| Steam level | `smoke` | `sensor` | `steamLevel` | +| Total Power | | `sensor` | `totalElectricityUsed` | +| Total Wash Cycle | `counter` | `sensor` | `totalWashCycle` | +| Total Water | | `sensor` | `totalWaterUsed` | ### Washing machine #### Controls -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Pause Washing Machine | `pause` | `switch` | `pauseProgram` / `resumeProgram` | ✔ | -| Washing Machine | `washing-machine` | `switch` | `startProgram` / `stopProgram` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Pause Washing Machine | `pause` | `switch` | `pauseProgram` / `resumeProgram` | +| Washing Machine | `washing-machine` | `switch` | `startProgram` / `stopProgram` | #### Configs -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` | ❌ | -| Delay Time | `timer-plus` | `number` | `startProgram.delayTime` | ✔ | -| Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | ✔ | -| Keep Fresh | `refresh-circle` | `switch` | `startProgram.autoSoftenerStatus` | ✔ | -| Liquid Detergent Dose | `cup-water` | `sensor` | `startProgram.liquidDetergentDose` | ✔ | -| Main Wash Time | `clock-start` | `number` | `startProgram.mainWashTime` | ✔ | -| Powder Detergent Dose | `cup` | `sensor` | `startProgram.powderDetergentDose` | ✔ | -| Program | | `select` | `startProgram.program` | ✔ | -| Rinse Iterations | `rotate-right` | `number` | `startProgram.rinseIterations` | ✔ | -| Soak Prewash Selection | `tshirt-crew` | `switch` | `startProgram.haier_SoakPrewashSelection` | ✔ | -| Spin speed | `numeric` | `select` | `startProgram.spinSpeed` | ✔ | -| Suggested weight | `weight-kilogram` | `sensor` | `startProgram.weight` | ✔ | -| Temperature | `thermometer` | `select` | `startProgram.temp` | ✔ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` | +| Delay Time | `timer-plus` | `number` | `startProgram.delayTime` | +| Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | +| Keep Fresh | `refresh-circle` | `switch` | `startProgram.autoSoftenerStatus` | +| Liquid Detergent Dose | `cup-water` | `sensor` | `startProgram.liquidDetergentDose` | +| Main Wash Time | `clock-start` | `number` | `startProgram.mainWashTime` | +| Powder Detergent Dose | `cup` | `sensor` | `startProgram.powderDetergentDose` | +| Program | | `select` | `startProgram.program` | +| Rinse Iterations | `rotate-right` | `number` | `startProgram.rinseIterations` | +| Soak Prewash Selection | `tshirt-crew` | `switch` | `startProgram.haier_SoakPrewashSelection` | +| Spin speed | `numeric` | `select` | `startProgram.spinSpeed` | +| Suggested weight | `weight-kilogram` | `sensor` | `startProgram.weight` | +| Temperature | `thermometer` | `select` | `startProgram.temp` | #### Sensors -| Name | Icon | Entity | Key | Auto-Translation | -| --- | --- | --- | --- | --- | -| Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | ❌ | -| Current Water Used | `water` | `sensor` | `currentWaterUsed` | ❌ | -| Door | | `binary_sensor` | `doorStatus` | ✔ | -| Door Lock | | `binary_sensor` | `doorLockStatus` | ✔ | -| Error | `math-log` | `sensor` | `errors` | ✔ | -| Machine Status | `information` | `sensor` | `machMode` | ✔ | -| Program Phase | `washing-machine` | `sensor` | `prPhase` | ✔ | -| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | ✔ | -| Remote Control | `remote` | `binary_sensor` | `attributes.lastConnEvent.category` | ✔ | -| Spin Speed | `speedometer` | `sensor` | `spinSpeed` | ✔ | -| Total Power | | `sensor` | `totalElectricityUsed` | ❌ | -| Total Wash Cycle | `counter` | `sensor` | `totalWashCycle` | ❌ | -| Total Water | | `sensor` | `totalWaterUsed` | ❌ | +| Name | Icon | Entity | Key | +| --- | --- | --- | --- | +| Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | +| Current Water Used | `water` | `sensor` | `currentWaterUsed` | +| Door | | `binary_sensor` | `doorStatus` | +| Door Lock | | `binary_sensor` | `doorLockStatus` | +| Error | `math-log` | `sensor` | `errors` | +| Machine Status | `information` | `sensor` | `machMode` | +| Program Phase | `washing-machine` | `sensor` | `prPhase` | +| Remaining Time | `timer` | `sensor` | `remainingTimeMM` | +| Remote Control | `remote` | `binary_sensor` | `attributes.lastConnEvent.category` | +| Spin Speed | `speedometer` | `sensor` | `spinSpeed` | +| Total Power | | `sensor` | `totalElectricityUsed` | +| Total Wash Cycle | `counter` | `sensor` | `totalWashCycle` | +| Total Water | | `sensor` | `totalWaterUsed` | diff --git a/custom_components/hon/binary_sensor.py b/custom_components/hon/binary_sensor.py index 680fcc8..7550f27 100644 --- a/custom_components/hon/binary_sensor.py +++ b/custom_components/hon/binary_sensor.py @@ -79,8 +79,7 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = { translation_key="remote_control", ), HonBinarySensorEntityDescription( - key="startProgram.prewash", - name="Pre Wash", + key="startProgram.prewash", name="Pre Wash", translation_key="prewash" ), HonBinarySensorEntityDescription( key="extraRinse1", name="Extra Rinse 1", translation_key="extra_rinse_1" @@ -124,6 +123,7 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = { device_class=BinarySensorDeviceClass.RUNNING, on_value="1", icon="mdi:power-cycle", + translation_key="on", ), ), "IH": ( @@ -149,6 +149,7 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = { device_class=BinarySensorDeviceClass.RUNNING, on_value="1", icon="mdi:power-cycle", + translation_key="on", ), HonBinarySensorEntityDescription( key="hotStatus", @@ -169,6 +170,7 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = { name="Hob Lock", device_class=BinarySensorDeviceClass.LOCK, on_value="0", + translation_key="child_lock", ), ), "DW": ( diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index eedcdfd..a04b5ba 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -42,6 +42,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { device_class=SensorDeviceClass.ENERGY, state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + translation_key="energy_total", ), SensorEntityDescription( key="totalWaterUsed", @@ -49,12 +50,14 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { device_class=SensorDeviceClass.WATER, state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfVolume.LITERS, + translation_key="water_total", ), SensorEntityDescription( key="totalWashCycle", name="Total Wash Cycle", state_class=SensorStateClass.TOTAL_INCREASING, icon="mdi:counter", + translation_key="cycles_total", ), SensorEntityDescription( key="currentElectricityUsed", @@ -63,12 +66,14 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { device_class=SensorDeviceClass.POWER, native_unit_of_measurement=UnitOfPower.KILO_WATT, icon="mdi:lightning-bolt", + translation_key="energy_current", ), SensorEntityDescription( key="currentWaterUsed", name="Current Water Used", state_class=SensorStateClass.MEASUREMENT, icon="mdi:water", + translation_key="water_current", ), SensorEntityDescription( key="startProgram.weight", @@ -202,6 +207,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { device_class=SensorDeviceClass.ENERGY, state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + translation_key="energy_total", ), SensorEntityDescription( key="totalWaterUsed", @@ -209,12 +215,14 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { device_class=SensorDeviceClass.WATER, state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfVolume.LITERS, + translation_key="water_total", ), SensorEntityDescription( key="totalWashCycle", name="Total Wash Cycle", state_class=SensorStateClass.TOTAL_INCREASING, icon="mdi:counter", + translation_key="cycles_total", ), SensorEntityDescription( key="currentElectricityUsed", @@ -223,12 +231,14 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { device_class=SensorDeviceClass.POWER, native_unit_of_measurement=UnitOfPower.KILO_WATT, icon="mdi:lightning-bolt", + translation_key="energy_current", ), SensorEntityDescription( key="currentWaterUsed", name="Current Water Used", state_class=SensorStateClass.MEASUREMENT, icon="mdi:water", + translation_key="water_current", ), SensorEntityDescription( key="startProgram.weight", @@ -265,6 +275,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { key="prCode", name="Current Program", icon="mdi:tumble-dryer", + translation_key="programs", ), SensorEntityDescription( key="prPhase", @@ -344,7 +355,9 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { native_unit_of_measurement=UnitOfTemperature.CELSIUS, translation_key="temperature", ), - SensorEntityDescription(key="errors", name="Error", icon="mdi:math-log"), + SensorEntityDescription( + key="errors", name="Error", icon="mdi:math-log", translation_key="errors" + ), SensorEntityDescription( key="power", name="Power", diff --git a/custom_components/hon/switch.py b/custom_components/hon/switch.py index 7b76dc9..412c744 100644 --- a/custom_components/hon/switch.py +++ b/custom_components/hon/switch.py @@ -51,6 +51,7 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { name="Delay Status", icon="mdi:timer-check", entity_category=EntityCategory.CONFIG, + translation_key="delay_time", ), HonSwitchEntityDescription( key="startProgram.haier_SoakPrewashSelection", diff --git a/custom_components/hon/translations/bg.json b/custom_components/hon/translations/bg.json index 5926d22..b457373 100644 --- a/custom_components/hon/translations/bg.json +++ b/custom_components/hon/translations/bg.json @@ -30,7 +30,7 @@ "8000000000000": "E4: Провери подаването на вода" } }, - "tumbledryerprogram": { + "programs": { "state": { "0": "Стандартна", "62": "Памук", diff --git a/custom_components/hon/translations/cs.json b/custom_components/hon/translations/cs.json index 2ae21ad..d44ead8 100644 --- a/custom_components/hon/translations/cs.json +++ b/custom_components/hon/translations/cs.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Tekut\u00e9 prost\u0159edky" + }, + "errors": { + "name": "Chyba" + }, + "programs": { + "name": "Aktu\u00e1ln\u00ed program" + }, + "cycles_total": { + "name": "Cykly Celkem" + }, + "energy_total": { + "name": "Spot\u0159eba energie Celkem" + }, + "water_total": { + "name": "Efektivn\u00ed vyu\u017e\u00edv\u00e1n\u00ed vody Celkem" + }, + "energy_current": { + "name": "Spot\u0159eba energie Aktu\u00e1ln\u00ed" + }, + "water_current": { + "name": "Efektivn\u00ed vyu\u017e\u00edv\u00e1n\u00ed vody Aktu\u00e1ln\u00ed" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Odlo\u017een\u00e9 spu\u0161t\u011bn\u00ed" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "P\u0159ipojen\u00ed spot\u0159ebi\u010de" + }, + "child_lock": { + "name": "D\u011btsk\u00fd z\u00e1mek" + }, + "on": { + "name": "Zapnout" + }, + "prewash": { + "name": "P\u0159edp\u00edrka\r\r\r\r\r\r\n" } }, "number": { diff --git a/custom_components/hon/translations/de.json b/custom_components/hon/translations/de.json index d393552..7667627 100644 --- a/custom_components/hon/translations/de.json +++ b/custom_components/hon/translations/de.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Fl\u00fcssigwaschmittel" + }, + "errors": { + "name": "Fehler" + }, + "programs": { + "name": "Aktuelles Programm" + }, + "cycles_total": { + "name": "Waschg\u00e4nge Insgesamt" + }, + "energy_total": { + "name": "Energieverbrauch Insgesamt" + }, + "water_total": { + "name": "Wasserverbrauch Insgesamt" + }, + "energy_current": { + "name": "Energieverbrauch Aktuell" + }, + "water_current": { + "name": "Wasserverbrauch Aktuell" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Einschaltverz\u00f6gerung" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Ger\u00e4teverbindung" + }, + "child_lock": { + "name": "Kindersicherung" + }, + "on": { + "name": "An" + }, + "prewash": { + "name": "Vorsp\u00fclen" } }, "number": { diff --git a/custom_components/hon/translations/el.json b/custom_components/hon/translations/el.json index 0fe000f..ce55ba3 100644 --- a/custom_components/hon/translations/el.json +++ b/custom_components/hon/translations/el.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "\u03a5\u03b3\u03c1\u03cc" + }, + "errors": { + "name": "\u03a3\u03c6\u03ac\u03bb\u03bc\u03b1" + }, + "programs": { + "name": "\u03a4\u03c1\u03ad\u03c7\u03c9\u03bd \u03c0\u03c1\u03cc\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1" + }, + "cycles_total": { + "name": "\u039a\u03cd\u03ba\u03bb\u03bf\u03b9 \u03a3\u03cd\u03bd\u03bf\u03bb\u03bf" + }, + "energy_total": { + "name": "\u039a\u03b1\u03c4\u03b1\u03bd\u03ac\u03bb\u03c9\u03c3\u03b7 \u03b5\u03bd\u03ad\u03c1\u03b3\u03b5\u03b9\u03b1\u03c2 \u03a3\u03cd\u03bd\u03bf\u03bb\u03bf" + }, + "water_total": { + "name": "\u0391\u03c0\u03cc\u03b4\u03bf\u03c3\u03b7 \u03bd\u03b5\u03c1\u03bf\u03cd \u03a3\u03cd\u03bd\u03bf\u03bb\u03bf" + }, + "energy_current": { + "name": "\u039a\u03b1\u03c4\u03b1\u03bd\u03ac\u03bb\u03c9\u03c3\u03b7 \u03b5\u03bd\u03ad\u03c1\u03b3\u03b5\u03b9\u03b1\u03c2 Current" + }, + "water_current": { + "name": "\u0391\u03c0\u03cc\u03b4\u03bf\u03c3\u03b7 \u03bd\u03b5\u03c1\u03bf\u03cd Current" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "\u039a\u03b1\u03b8\u03c5\u03c3\u03c4\u03b5\u03c1\u03b7\u03bc\u03ad\u03bd\u03b7 \u03ad\u03bd\u03b1\u03c1\u03be\u03b7" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "\u03a3\u03cd\u03bd\u03b4\u03b5\u03c3\u03b7 \u03c3\u03c5\u03c3\u03ba\u03b5\u03c5\u03ae\u03c2" + }, + "child_lock": { + "name": "\u039a\u03bb\u03b5\u03af\u03b4\u03c9\u03bc\u03b1 \u03b3\u03b9\u03b1 \u03c0\u03b1\u03b9\u03b4\u03b9\u03ac" + }, + "on": { + "name": "\u0395\u03bd\u03b5\u03c1\u03b3\u03cc" + }, + "prewash": { + "name": "\u03c0\u03c1\u03bf\u03c0\u03bb\u03c5\u03c3\u03b7" } }, "number": { diff --git a/custom_components/hon/translations/en.json b/custom_components/hon/translations/en.json index 89cec15..0c40ca4 100644 --- a/custom_components/hon/translations/en.json +++ b/custom_components/hon/translations/en.json @@ -28,9 +28,10 @@ "00": "No error", "100000000000": "E2: Check if the door is closed", "8000000000000": "E4: Check the water supply" - } + }, + "name": "Error" }, - "tumbledryerprogram": { + "programs": { "state": { "0": "Default", "62": "Cotton", @@ -47,7 +48,8 @@ "85": "Quick Dry", "92": "Delicate", "103": "Remote" - } + }, + "name": "Current program" }, "tumbledryertemplevel": { "state": { @@ -196,6 +198,21 @@ }, "det_liquid": { "name": "Liquid detergent" + }, + "cycles_total": { + "name": "Cycles Total" + }, + "energy_total": { + "name": "Energy Consumption Total" + }, + "water_total": { + "name": "Water efficiency Total" + }, + "energy_current": { + "name": "Energy Consumption Current" + }, + "water_current": { + "name": "Water efficiency Current" } }, "switch": { @@ -246,6 +263,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Delay Start" } }, "select": { @@ -984,6 +1004,15 @@ }, "connection": { "name": "Appliance connection" + }, + "child_lock": { + "name": "Child Lock" + }, + "on": { + "name": "On" + }, + "prewash": { + "name": "Pre-wash " } }, "number": { diff --git a/custom_components/hon/translations/es.json b/custom_components/hon/translations/es.json index accd86c..f51cea8 100644 --- a/custom_components/hon/translations/es.json +++ b/custom_components/hon/translations/es.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "L\u00edquido" + }, + "errors": { + "name": "Error" + }, + "programs": { + "name": "Programa actual" + }, + "cycles_total": { + "name": "Ciclos Total" + }, + "energy_total": { + "name": "Consumo de energ\u00eda Total" + }, + "water_total": { + "name": "Eficiencia h\u00eddrica Total" + }, + "energy_current": { + "name": "Consumo de energ\u00eda Actual" + }, + "water_current": { + "name": "Eficiencia h\u00eddrica Actual" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Inicio Diferido" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Conexi\u00f3n del electrodom\u00e9stico" + }, + "child_lock": { + "name": "Bloqueo infantil" + }, + "on": { + "name": "Activado" + }, + "prewash": { + "name": "Pre-lavado" } }, "number": { diff --git a/custom_components/hon/translations/fr.json b/custom_components/hon/translations/fr.json index 0f8c285..47d1a92 100644 --- a/custom_components/hon/translations/fr.json +++ b/custom_components/hon/translations/fr.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Liquide" + }, + "errors": { + "name": "Erreur" + }, + "programs": { + "name": "Programme actuel" + }, + "cycles_total": { + "name": "Cycles Total" + }, + "energy_total": { + "name": "Consommation d\u2019\u00e9nergie Total" + }, + "water_total": { + "name": "Efficacit\u00e9 en eau Total" + }, + "energy_current": { + "name": "Consommation d\u2019\u00e9nergie Actuel" + }, + "water_current": { + "name": "Efficacit\u00e9 en eau Actuel" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Garder la fra\u00eecheur" + }, + "delay_time": { + "name": "D\u00e9marrage Diff\u00e9r\u00e9" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Connexion de l\u2019appareil" + }, + "child_lock": { + "name": "S\u00e9curit\u00e9 enfants" + }, + "on": { + "name": "Marche" + }, + "prewash": { + "name": "Pr\u00e9lavage" } }, "number": { diff --git a/custom_components/hon/translations/he.json b/custom_components/hon/translations/he.json index 2e97feb..27f06c7 100644 --- a/custom_components/hon/translations/he.json +++ b/custom_components/hon/translations/he.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Liquid detergent" + }, + "errors": { + "name": "Error" + }, + "programs": { + "name": "Current program" + }, + "cycles_total": { + "name": "\u05de\u05d7\u05d6\u05d5\u05e8\u05d9\u05dd Total" + }, + "energy_total": { + "name": "Energy Consumption Total" + }, + "water_total": { + "name": "Water efficiency Total" + }, + "energy_current": { + "name": "Energy Consumption Current" + }, + "water_current": { + "name": "Water efficiency Current" } }, "select": { @@ -449,6 +470,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Delay Start" } }, "binary_sensor": { @@ -511,6 +535,15 @@ }, "connection": { "name": "Appliance connection" + }, + "child_lock": { + "name": "Child Lock" + }, + "on": { + "name": "\u05e2\u05b7\u05dc" + }, + "prewash": { + "name": "\u05e9\u05d8\u05d9\u05e4\u05d4 \u05de\u05e8\u05d0\u05e9" } }, "number": { diff --git a/custom_components/hon/translations/hr.json b/custom_components/hon/translations/hr.json index 540f693..9555445 100644 --- a/custom_components/hon/translations/hr.json +++ b/custom_components/hon/translations/hr.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Teku\u0107ina" + }, + "errors": { + "name": "Gre\u0161ka" + }, + "programs": { + "name": "Trenuta\u010dni program" + }, + "cycles_total": { + "name": "Programi Ukupno" + }, + "energy_total": { + "name": "Potro\u0161nja energije Ukupno" + }, + "water_total": { + "name": "U\u010dinkovitost vode Ukupno" + }, + "energy_current": { + "name": "Potro\u0161nja energije Current" + }, + "water_current": { + "name": "U\u010dinkovitost vode Current" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Odgoda po\u010detka" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Priklju\u010dak ure\u0111aja" + }, + "child_lock": { + "name": "Zaklju\u010davanje za za\u0161titu djece" + }, + "on": { + "name": "Uklju\u010deno" + }, + "prewash": { + "name": "Pretpranje" } }, "number": { diff --git a/custom_components/hon/translations/it.json b/custom_components/hon/translations/it.json index c0c8fe2..0db4f4d 100644 --- a/custom_components/hon/translations/it.json +++ b/custom_components/hon/translations/it.json @@ -28,9 +28,10 @@ "00": "Nessun Errore", "100000000000": "E2: Controllare se la porta \u00e8 chiusa correttamente", "8000000000000": "E4: Controllare l'approvvigionamento idrico" - } + }, + "name": "Errore" }, - "tumbledryerprogram": { + "programs": { "state": { "0": "Default", "62": "Cotone", @@ -47,7 +48,8 @@ "85": "Asciugatura Rapida", "92": "Delicati", "103": "Controllo Remoto" - } + }, + "name": "Programma attuale" }, "tumbledryertemplevel": { "state": { @@ -189,6 +191,21 @@ }, "det_liquid": { "name": "Detersivo liquido" + }, + "cycles_total": { + "name": "Cicli Totale" + }, + "energy_total": { + "name": "Consumo energetico Totale" + }, + "water_total": { + "name": "Efficienza idrica Totale" + }, + "energy_current": { + "name": "Consumo energetico Odierna" + }, + "water_current": { + "name": "Efficienza idrica Odierna" } }, "select": { @@ -907,6 +924,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Utilizzo nelle ore notturne" } }, "binary_sensor": { @@ -969,6 +989,15 @@ }, "connection": { "name": "Connessione dell'elettrodomestico" + }, + "child_lock": { + "name": "Child Lock" + }, + "on": { + "name": "On" + }, + "prewash": { + "name": "Prelavaggio" } }, "number": { diff --git a/custom_components/hon/translations/nl.json b/custom_components/hon/translations/nl.json index f6a6c99..881bea1 100644 --- a/custom_components/hon/translations/nl.json +++ b/custom_components/hon/translations/nl.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Vloeibaar" + }, + "errors": { + "name": "Fout" + }, + "programs": { + "name": "Huidig programma" + }, + "cycles_total": { + "name": "Programma's Totaal" + }, + "energy_total": { + "name": "Energieverbruik Totaal" + }, + "water_total": { + "name": "Effici\u00ebnt waterverbruik Totaal" + }, + "energy_current": { + "name": "Energieverbruik Huidige" + }, + "water_current": { + "name": "Effici\u00ebnt waterverbruik Huidige" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Vertraag Start" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Het apparaat verbinden" + }, + "child_lock": { + "name": "Kinderslot" + }, + "on": { + "name": "Aan" + }, + "prewash": { + "name": "Voorwas" } }, "number": { diff --git a/custom_components/hon/translations/pl.json b/custom_components/hon/translations/pl.json index be111e0..5f862df 100644 --- a/custom_components/hon/translations/pl.json +++ b/custom_components/hon/translations/pl.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "P\u0142yn" + }, + "errors": { + "name": "B\u0142\u0105d" + }, + "programs": { + "name": "Aktualny program" + }, + "cycles_total": { + "name": "Cykle Suma" + }, + "energy_total": { + "name": "Zu\u017cycie energii Suma" + }, + "water_total": { + "name": "Wydajno\u015b\u0107 zu\u017cycia wody Suma" + }, + "energy_current": { + "name": "Zu\u017cycie energii Aktualne" + }, + "water_current": { + "name": "Wydajno\u015b\u0107 zu\u017cycia wody Aktualne" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Op\u00f3\u017aniony Start" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Pod\u0142\u0105czenie urz\u0105dzenia" + }, + "child_lock": { + "name": "Blokada rodzicielska" + }, + "on": { + "name": "W\u0142." + }, + "prewash": { + "name": "Mycie wst\u0119pne" } }, "number": { diff --git a/custom_components/hon/translations/pt.json b/custom_components/hon/translations/pt.json index 64571eb..2475271 100644 --- a/custom_components/hon/translations/pt.json +++ b/custom_components/hon/translations/pt.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "L\u00edquido" + }, + "errors": { + "name": "Erro" + }, + "programs": { + "name": "Programa atual" + }, + "cycles_total": { + "name": "Ciclos Total" + }, + "energy_total": { + "name": "Consumo de energia Total" + }, + "water_total": { + "name": "Efici\u00eancia da \u00e1gua Total" + }, + "energy_current": { + "name": "Consumo de energia Data" + }, + "water_current": { + "name": "Efici\u00eancia da \u00e1gua Data" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "In\u00edcio adiado" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Liga\u00e7\u00e3o do aparelho" + }, + "child_lock": { + "name": "Trinco para Crian\u00e7as" + }, + "on": { + "name": "On" + }, + "prewash": { + "name": "Pr\u00e9-lavagem" } }, "number": { diff --git a/custom_components/hon/translations/ro.json b/custom_components/hon/translations/ro.json index cde6326..9859f53 100644 --- a/custom_components/hon/translations/ro.json +++ b/custom_components/hon/translations/ro.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Lichid" + }, + "errors": { + "name": "Eroare" + }, + "programs": { + "name": "Program actual" + }, + "cycles_total": { + "name": "Cicluri Total" + }, + "energy_total": { + "name": "Consumul de energie Total" + }, + "water_total": { + "name": "Eficien\u021ba apei Total" + }, + "energy_current": { + "name": "Consumul de energie Current" + }, + "water_current": { + "name": "Eficien\u021ba apei Current" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Pornire \u00eent\u00e2rziat\u0103" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Conectarea aparatului" + }, + "child_lock": { + "name": "Blocare acces copii" + }, + "on": { + "name": "Pornit" + }, + "prewash": { + "name": "Presp\u0103lare" } }, "number": { diff --git a/custom_components/hon/translations/ru.json b/custom_components/hon/translations/ru.json index fbdcee6..d40f878 100644 --- a/custom_components/hon/translations/ru.json +++ b/custom_components/hon/translations/ru.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "\u0416\u0438\u0434\u043a\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e" + }, + "errors": { + "name": "\u041e\u0448\u0438\u0431\u043a\u0430" + }, + "programs": { + "name": "\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430" + }, + "cycles_total": { + "name": "\u0426\u0438\u043a\u043b\u044b \u0418\u0442\u043e\u0433\u043e" + }, + "energy_total": { + "name": "\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0418\u0442\u043e\u0433\u043e" + }, + "water_total": { + "name": "\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0434\u0430 \u0432\u043e\u0434\u044b \u0418\u0442\u043e\u0433\u043e" + }, + "energy_current": { + "name": "\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0422\u0435\u043a\u0443\u0449\u0438\u0439" + }, + "water_current": { + "name": "\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0434\u0430 \u0432\u043e\u0434\u044b \u0422\u0435\u043a\u0443\u0449\u0438\u0439" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh (\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0436\u0435\u0441\u0442\u0438)" + }, + "delay_time": { + "name": "\u041e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0441\u043a" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f" + }, + "child_lock": { + "name": "\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u0442 \u0434\u0435\u0442\u0435\u0439" + }, + "on": { + "name": "\u0412\u043a\u043b." + }, + "prewash": { + "name": "\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0439\u043a\u0430" } }, "number": { diff --git a/custom_components/hon/translations/sk.json b/custom_components/hon/translations/sk.json index 5199fc6..fa143fc 100644 --- a/custom_components/hon/translations/sk.json +++ b/custom_components/hon/translations/sk.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Kvapaln\u00e9 pracie prostriedky" + }, + "errors": { + "name": "Chyba" + }, + "programs": { + "name": "Aktu\u00e1lny program" + }, + "cycles_total": { + "name": "Cykly S\u00fa\u010det" + }, + "energy_total": { + "name": "Spotreba energie S\u00fa\u010det" + }, + "water_total": { + "name": "\u00da\u010dinnos\u0165 vody S\u00fa\u010det" + }, + "energy_current": { + "name": "Spotreba energie Current" + }, + "water_current": { + "name": "\u00da\u010dinnos\u0165 vody Current" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Odlo\u017een\u00fd \u0161tart" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Pripojenie spotrebi\u010da" + }, + "child_lock": { + "name": "Detsk\u00e1 poistka" + }, + "on": { + "name": "Zap." + }, + "prewash": { + "name": "Predum\u00fdvanie" } }, "number": { diff --git a/custom_components/hon/translations/sl.json b/custom_components/hon/translations/sl.json index c8c4193..52cb002 100644 --- a/custom_components/hon/translations/sl.json +++ b/custom_components/hon/translations/sl.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Teko\u010dina" + }, + "errors": { + "name": "Napaka" + }, + "programs": { + "name": "Trenutni program" + }, + "cycles_total": { + "name": "Programi Skupaj" + }, + "energy_total": { + "name": "Poraba energije Skupaj" + }, + "water_total": { + "name": "U\u010dinkovita raba vode Skupaj" + }, + "energy_current": { + "name": "Poraba energije Current" + }, + "water_current": { + "name": "U\u010dinkovita raba vode Current" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "S funkcijo Zamik vklopa je mo\u017eno odlo\u017eiti za\u010detek su\u0161ilnega cikla od 1 do 24 ur. Na zaslonu se prika\u017ee izbrana zakasnitev. Da bi videli kako se zmanj\u0161uje iz ure v uro, pritisnite ZA\u010cETEK. Na ta na\u010din bo perilo suho takrat, ko boste to \u017eeleli, in zagnali cikel, ko vam to najbolj ustreza, celo pono\u010di." } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Povezava aparata" + }, + "child_lock": { + "name": "Varnostni zaklep" + }, + "on": { + "name": "On" + }, + "prewash": { + "name": "Predpranje" } }, "number": { diff --git a/custom_components/hon/translations/sr.json b/custom_components/hon/translations/sr.json index 63f021e..58d130f 100644 --- a/custom_components/hon/translations/sr.json +++ b/custom_components/hon/translations/sr.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "Te\u010dni" + }, + "errors": { + "name": "Gre\u0161ka" + }, + "programs": { + "name": "Trenutni program" + }, + "cycles_total": { + "name": "Ciklusi Ukupno" + }, + "energy_total": { + "name": "Potro\u0161nja energije Ukupno" + }, + "water_total": { + "name": "Efikasnost vode Ukupno" + }, + "energy_current": { + "name": "Potro\u0161nja energije Current" + }, + "water_current": { + "name": "Efikasnost vode Current" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Odlo\u017eeni start" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Povezivanje ure\u0111aja" + }, + "child_lock": { + "name": "Blokada tastera za decu" + }, + "on": { + "name": "Uklju\u010deno" + }, + "prewash": { + "name": "Predpranje" } }, "number": { diff --git a/custom_components/hon/translations/tr.json b/custom_components/hon/translations/tr.json index f7108e1..a65b47b 100644 --- a/custom_components/hon/translations/tr.json +++ b/custom_components/hon/translations/tr.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "S\u0131v\u0131" + }, + "errors": { + "name": "Hata" + }, + "programs": { + "name": "Ge\u00e7erli program" + }, + "cycles_total": { + "name": "Programlar Toplam" + }, + "energy_total": { + "name": "Enerji T\u00fcketimi Toplam" + }, + "water_total": { + "name": "Su verimlili\u011fi Toplam" + }, + "energy_current": { + "name": "Enerji T\u00fcketimi Current" + }, + "water_current": { + "name": "Su verimlili\u011fi Current" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "Gecikmeli Ba\u015flatma" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "Cihaz ba\u011flant\u0131s\u0131" + }, + "child_lock": { + "name": "\u00c7ocuk Kilidi" + }, + "on": { + "name": "A\u00e7\u0131k" + }, + "prewash": { + "name": "Pre-wash" } }, "number": { diff --git a/custom_components/hon/translations/zh.json b/custom_components/hon/translations/zh.json index 69b0dbb..fcfc665 100644 --- a/custom_components/hon/translations/zh.json +++ b/custom_components/hon/translations/zh.json @@ -133,6 +133,27 @@ }, "det_liquid": { "name": "\u6d17\u8863\u6db2" + }, + "errors": { + "name": "\u9519\u8bef" + }, + "programs": { + "name": "\u5f53\u524d\u7a0b\u5e8f" + }, + "cycles_total": { + "name": "\u5faa\u73af \u603b\u8ba1" + }, + "energy_total": { + "name": "\u80fd\u8017 \u603b\u8ba1" + }, + "water_total": { + "name": "\u7528\u6c34\u6548\u7387 \u603b\u8ba1" + }, + "energy_current": { + "name": "\u80fd\u8017 Current" + }, + "water_current": { + "name": "\u7528\u6c34\u6548\u7387 Current" } }, "select": { @@ -851,6 +872,9 @@ }, "keep_fresh": { "name": "Keep Fresh" + }, + "delay_time": { + "name": "\u5ef6\u65f6\u542f\u52a8" } }, "binary_sensor": { @@ -913,6 +937,15 @@ }, "connection": { "name": "\u8bbe\u5907\u8fde\u63a5" + }, + "child_lock": { + "name": "\u513f\u7ae5\u9501" + }, + "on": { + "name": "\u6253\u5f00" + }, + "prewash": { + "name": "\u9884\u6d17" } }, "number": { diff --git a/scripts/generate_translation.py b/scripts/generate_translation.py index 647c2d3..6fe384c 100755 --- a/scripts/generate_translation.py +++ b/scripts/generate_translation.py @@ -136,6 +136,7 @@ NAMES = { "prewash": "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_OTHER_OPTIONS.PREWASH", "pause": "GENERAL.PAUSE_PROGRAM", "keep_fresh": "GLOBALS.APPLIANCE_STATUS.TUMBLING", + "delay_time": "HINTS.TIPS_TIME_ENERGY_SAVING.TIPS_USE_AT_NIGHT_TITLE", }, "binary_sensor": { "door_lock": "WASHING_CMD&CTRL.CHECK_UP_RESULTS.DOOR_LOCK", @@ -153,6 +154,9 @@ NAMES = { "salt_level": "DW_CMD&CTRL.MAINTENANCE.CONSUMABLE_LEVELS_ICON_SALT", "door_open": "GLOBALS.APPLIANCE_STATUS.DOOR_OPEN", "connection": "ENROLLMENT_COMMON.HEADER_NAME.STEP_APPLIANCE_CONNECTION", + "child_lock": "AP.FOOTER_MENU_MORE.SECURITY_LOCK_TITLE", + "on": "GLOBALS.GENERAL.ON", + "prewash": "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_OTHER_OPTIONS.PREWASH", }, "button": { "induction_hob": "GLOBALS.APPLIANCES_NAME.IH", @@ -189,6 +193,28 @@ NAMES = { "energy_label": "WASHING_CMD&CTRL.DRAWER_PROGRAM_FILTERS.ENERGY_EFFICIENCY", "det_dust": "HUBS.WIDGET.STAINS_WIDGET.STAINS.SUGGESTED_DET_DUST", "det_liquid": "HUBS.WIDGET.STAINS_WIDGET.STAINS.SUGGESTED_DET_LIQUID", + "errors": "ROBOT_CMD&CTRL.PHASE_ERROR.TITLE", + "programs": "OV.TABS.CURRENT_PROGRAM", + "cycles_total": [ + "WASHING_CMD&CTRL.GENERAL.CYCLES", + "WC.VIRTUAL_WINE_STATS_COUNTRY.TOTAL", + ], + "energy_total": [ + "MISE.ENERGY_CONSUMPTION.TITLE", + "WC.VIRTUAL_WINE_STATS_COUNTRY.TOTAL", + ], + "water_total": [ + "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_RESULT.WATER_EFFICIENCY", + "WC.VIRTUAL_WINE_STATS_COUNTRY.TOTAL", + ], + "energy_current": [ + "MISE.ENERGY_CONSUMPTION.TITLE", + "CUBE90_GLOBAL.GENERAL.CURRENT", + ], + "water_current": [ + "WASHING_CMD&CTRL.PROGRAM_CYCLE_DETAIL_RESULT.WATER_EFFICIENCY", + "CUBE90_GLOBAL.GENERAL.CURRENT", + ], }, "number": { "power_management": "HINTS.COOKING_WITH_INDUCTION.POWER_MANAGEMENT", @@ -240,6 +266,10 @@ def save_json(path, keys): def load_key(full_key, json_data, fallback=None): + if isinstance(full_key, list): + return " ".join( + [load_key(item, json_data, fallback).strip() for item in full_key] + ) result = json_data.copy() for key in full_key.split("."): result = result.get(key, {}) diff --git a/scripts/sensor_docs.py b/scripts/sensor_docs.py index ec2c7e5..2c125f8 100755 --- a/scripts/sensor_docs.py +++ b/scripts/sensor_docs.py @@ -54,8 +54,7 @@ for entity_type, appliances in entities.items(): key = f"{entity.turn_on_key}` / `{entity.turn_off_key}" else: key = entity.key - translation = bool(entity.translation_key) - attributes = (key, entity.name, entity.icon, entity_type, translation) + attributes = (key, entity.name, entity.icon, entity_type) category = "control" if entity_type in ["switch", "button"] else "sensor" result.setdefault(appliance, {}).setdefault( entity.entity_category or category, [] @@ -66,14 +65,11 @@ for appliance, categories in sorted(result.items()): categories = {k: categories[k] for k in ENTITY_CATEGORY_SORT if k in categories} for category, data in categories.items(): text += f"#### {str(category).capitalize()}s\n" - text += "| Name | Icon | Entity | Key | Auto-Translation |\n" - text += "| --- | --- | --- | --- | --- |\n" - for key, name, icon, entity_type, translation in sorted( - data, key=lambda d: d[1] - ): + text += "| Name | Icon | Entity | Key |\n" + text += "| --- | --- | --- | --- |\n" + for key, name, icon, entity_type in sorted(data, key=lambda d: d[1]): icon = f"`{icon.replace('mdi:', '')}`" if icon else "" - translation = "✔" if translation else "❌" - text += f"| {name} | {icon} | `{entity_type}` | `{key}` | {translation} |\n" + text += f"| {name} | {icon} | `{entity_type}` | `{key}` |\n" with open(Path(__file__).parent.parent / "README.md", "r") as file: readme = file.read()