From a34c0516656916e55ff726adf99b6ce005f30955 Mon Sep 17 00:00:00 2001 From: Elad Bar Date: Thu, 20 Jun 2024 15:06:26 +0300 Subject: [PATCH] add support for ink tank --- CHANGELOG.md | 4 ++++ custom_components/hpprinter/manifest.json | 2 +- custom_components/hpprinter/parameters/data_points.json | 3 ++- custom_components/hpprinter/strings.json | 3 ++- custom_components/hpprinter/translations/de.json | 3 ++- custom_components/hpprinter/translations/dk.json | 3 ++- custom_components/hpprinter/translations/en.json | 3 ++- custom_components/hpprinter/translations/es.json | 3 ++- custom_components/hpprinter/translations/fr.json | 5 +++-- custom_components/hpprinter/translations/nb.json | 3 ++- custom_components/hpprinter/translations/nl.json | 3 ++- custom_components/hpprinter/translations/pl.json | 3 ++- custom_components/hpprinter/translations/pt-BR.json | 3 ++- custom_components/hpprinter/translations/ru.json | 3 ++- custom_components/hpprinter/translations/ua.json | 3 ++- 15 files changed, 32 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fad1b6..2ae5ef5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.3 + +- Add support for `inktank` cartridge type + ## 2.0.2 - Use HA client session instead of aiohttp directly diff --git a/custom_components/hpprinter/manifest.json b/custom_components/hpprinter/manifest.json index 38eae55..e5219e4 100644 --- a/custom_components/hpprinter/manifest.json +++ b/custom_components/hpprinter/manifest.json @@ -9,5 +9,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/elad-bar/ha-hpprinter/issues", "requirements": ["xmltodict~=0.13.0", "flatten_json", "defusedxml"], - "version": "2.0.2" + "version": "2.0.3" } diff --git a/custom_components/hpprinter/parameters/data_points.json b/custom_components/hpprinter/parameters/data_points.json index dea458c..bda574d 100644 --- a/custom_components/hpprinter/parameters/data_points.json +++ b/custom_components/hpprinter/parameters/data_points.json @@ -66,7 +66,8 @@ "inkcartridge", "printhead", "toner", - "tonercartridge" + "tonercartridge", + "inktank" ] }, "installation_date": { diff --git a/custom_components/hpprinter/strings.json b/custom_components/hpprinter/strings.json index 7190189..6454c63 100644 --- a/custom_components/hpprinter/strings.json +++ b/custom_components/hpprinter/strings.json @@ -48,7 +48,8 @@ "inkcartridge": "Ink", "printhead": "Printhead", "toner": "Toner", - "tonercartridge": "Toner" + "tonercartridge": "Toner", + "inktank": "Ink Tank" } }, "estimated_pages_remaining": { diff --git a/custom_components/hpprinter/translations/de.json b/custom_components/hpprinter/translations/de.json index 1755e5d..987da8e 100644 --- a/custom_components/hpprinter/translations/de.json +++ b/custom_components/hpprinter/translations/de.json @@ -52,6 +52,7 @@ "state": { "ink": "Tinte", "inkcartridge": "Tinte", + "inktank": "Tintentank", "printhead": "Druckkopf", "toner": "Toner", "tonercartridge": "Toner" @@ -60,10 +61,10 @@ "device_status": { "name": "Status", "state": { - "off": "Aus", "canceljob": "Aufgabe abbrechen", "copying": "Kopieren", "inpowersave": "Leerlauf", + "off": "Aus", "processing": "Drucken", "ready": "An", "scanprocessing": "Scannen" diff --git a/custom_components/hpprinter/translations/dk.json b/custom_components/hpprinter/translations/dk.json index d292d4c..9ba3ab4 100644 --- a/custom_components/hpprinter/translations/dk.json +++ b/custom_components/hpprinter/translations/dk.json @@ -52,6 +52,7 @@ "state": { "ink": "Bl\u00e6k", "inkcartridge": "Bl\u00e6k", + "inktank": "Bl\u00e6kbeholder", "printhead": "Printhead", "toner": "Toner", "tonercartridge": "Toner" @@ -60,10 +61,10 @@ "device_status": { "name": "Status", "state": { - "off": "Af", "canceljob": "Annullering af job", "copying": "Kopiering", "inpowersave": "Ledig", + "off": "Af", "processing": "Trykning", "ready": "P\u00e5", "scanprocessing": "Scanning" diff --git a/custom_components/hpprinter/translations/en.json b/custom_components/hpprinter/translations/en.json index 3ba9959..d122e0d 100644 --- a/custom_components/hpprinter/translations/en.json +++ b/custom_components/hpprinter/translations/en.json @@ -52,6 +52,7 @@ "state": { "ink": "Ink", "inkcartridge": "Ink", + "inktank": "Ink Tank", "printhead": "Printhead", "toner": "Toner", "tonercartridge": "Toner" @@ -60,10 +61,10 @@ "device_status": { "name": "Status", "state": { - "off": "Off", "canceljob": "Cancelling Job", "copying": "Copying", "inpowersave": "Idle", + "off": "Off", "processing": "Printing", "ready": "On", "scanprocessing": "Scanning" diff --git a/custom_components/hpprinter/translations/es.json b/custom_components/hpprinter/translations/es.json index c0399e9..58c76c2 100644 --- a/custom_components/hpprinter/translations/es.json +++ b/custom_components/hpprinter/translations/es.json @@ -52,6 +52,7 @@ "state": { "ink": "Tinta", "inkcartridge": "Tinta", + "inktank": "Tanque de tinta", "printhead": "Cabezal", "toner": "Virador", "tonercartridge": "Virador" @@ -60,10 +61,10 @@ "device_status": { "name": "Estado", "state": { - "off": "Apagada Apagado", "canceljob": "Cancelar trabajo", "copying": "Proceso de copiar", "inpowersave": "Inactiva Inactivo", + "off": "Apagada Apagado", "processing": "Impresi\u00f3n", "ready": "En", "scanprocessing": "Exploraci\u00f3n" diff --git a/custom_components/hpprinter/translations/fr.json b/custom_components/hpprinter/translations/fr.json index f59f14b..0c17fec 100644 --- a/custom_components/hpprinter/translations/fr.json +++ b/custom_components/hpprinter/translations/fr.json @@ -52,6 +52,7 @@ "state": { "ink": "Encre", "inkcartridge": "Encre", + "inktank": "R\u00e9servoir d'encre", "printhead": "T\u00eate d'impression", "toner": "Toner", "tonercartridge": "Toner" @@ -60,13 +61,13 @@ "device_status": { "name": "Statut", "state": { - "off": "D\u00e9sactiv\u00e9", "canceljob": "Annulation travail", "copying": "Copie", "inpowersave": "Inactif", + "off": "D\u00e9sactiv\u00e9", "processing": "Impression", "ready": "Pr\u00eat", - "scanprocessing": "Numérisation" + "scanprocessing": "Num\u00c3\u00a9risation" } }, "duplex_sheets": { diff --git a/custom_components/hpprinter/translations/nb.json b/custom_components/hpprinter/translations/nb.json index 492d299..65c1957 100644 --- a/custom_components/hpprinter/translations/nb.json +++ b/custom_components/hpprinter/translations/nb.json @@ -52,6 +52,7 @@ "state": { "ink": "Blekk", "inkcartridge": "Blekk", + "inktank": "Blekkbeholder", "printhead": "Skrivehode", "toner": "Toner", "tonercartridge": "Toner" @@ -60,10 +61,10 @@ "device_status": { "name": "Status", "state": { - "off": "Av", "canceljob": "Avbryt jobb", "copying": "Kopiering", "inpowersave": "Tomgang", + "off": "Av", "processing": "Printing", "ready": "P\u00e5", "scanprocessing": "Skanning" diff --git a/custom_components/hpprinter/translations/nl.json b/custom_components/hpprinter/translations/nl.json index d79e3a1..6a34412 100644 --- a/custom_components/hpprinter/translations/nl.json +++ b/custom_components/hpprinter/translations/nl.json @@ -52,6 +52,7 @@ "state": { "ink": "Inkt", "inkcartridge": "Inkt", + "inktank": "Inkttank", "printhead": "Printhead", "toner": "Toner", "tonercartridge": "Toner" @@ -60,10 +61,10 @@ "device_status": { "name": "Toestand", "state": { - "off": "Uit", "canceljob": "Job annuleren", "copying": "Kopieer", "inpowersave": "Inactief", + "off": "Uit", "processing": "Afdrukken", "ready": "Op", "scanprocessing": "Het scannen" diff --git a/custom_components/hpprinter/translations/pl.json b/custom_components/hpprinter/translations/pl.json index 4b1e044..610658d 100644 --- a/custom_components/hpprinter/translations/pl.json +++ b/custom_components/hpprinter/translations/pl.json @@ -52,6 +52,7 @@ "state": { "ink": "Atrament", "inkcartridge": "Atrament", + "inktank": "Zbiornik atramentowy", "printhead": "Printhead", "toner": "Toner", "tonercartridge": "Toner" @@ -60,10 +61,10 @@ "device_status": { "name": "Status", "state": { - "off": "Wy\u0142\u0105czony", "canceljob": "Anulowanie pracy", "copying": "Biurowy", "inpowersave": "Bezczynny", + "off": "Wy\u0142\u0105czony", "processing": "Druk", "ready": "NA", "scanprocessing": "\u0141\u00f3w" diff --git a/custom_components/hpprinter/translations/pt-BR.json b/custom_components/hpprinter/translations/pt-BR.json index dd653ea..d7cf436 100644 --- a/custom_components/hpprinter/translations/pt-BR.json +++ b/custom_components/hpprinter/translations/pt-BR.json @@ -52,6 +52,7 @@ "state": { "ink": "Tinta", "inkcartridge": "Tinta", + "inktank": "Tanque de tinta", "printhead": "Cabe\u00e7ote de impress\u00e3o", "toner": "Toner", "tonercartridge": "Toner" @@ -60,10 +61,10 @@ "device_status": { "name": "Status", "state": { - "off": "Desligada Desligado", "canceljob": "Cancelamento de trabalho", "copying": "C\u00f3pia", "inpowersave": "Parada Parado", + "off": "Desligada Desligado", "processing": "Impress\u00e3o", "ready": "Sobre", "scanprocessing": "Varredura" diff --git a/custom_components/hpprinter/translations/ru.json b/custom_components/hpprinter/translations/ru.json index 1f2ad6b..46bd0b5 100644 --- a/custom_components/hpprinter/translations/ru.json +++ b/custom_components/hpprinter/translations/ru.json @@ -52,6 +52,7 @@ "state": { "ink": "\u0427\u0435\u0440\u043d\u0438\u043b\u0430", "inkcartridge": "\u0427\u0435\u0440\u043d\u0438\u043b\u0430", + "inktank": "\u0427\u0435\u0440\u043d\u0438\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u043a", "printhead": "\u041f\u0435\u0447\u0430\u0442\u043d\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u0430", "toner": "\u0422\u043e\u043d\u0435\u0440", "tonercartridge": "\u0422\u043e\u043d\u0435\u0440" @@ -60,10 +61,10 @@ "device_status": { "name": "\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043b", "state": { - "off": "\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439", "canceljob": "\u041e\u0442\u043c\u0435\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u044b", "copying": "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435", "inpowersave": "\u041f\u0440\u0430\u0437\u0434\u043d\u044b\u0439", + "off": "\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439", "processing": "\u041f\u0435\u0447\u0430\u0442\u044c", "ready": "\u041d\u0430", "scanprocessing": "\u0421\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435" diff --git a/custom_components/hpprinter/translations/ua.json b/custom_components/hpprinter/translations/ua.json index 60c51a8..42e4901 100644 --- a/custom_components/hpprinter/translations/ua.json +++ b/custom_components/hpprinter/translations/ua.json @@ -52,6 +52,7 @@ "state": { "ink": "\u0427\u043e\u0440\u043d\u0438\u043b\u043e", "inkcartridge": "\u0427\u043e\u0440\u043d\u0438\u043b\u043e", + "inktank": "\u0427\u043e\u0440\u043d\u0438\u043b\u044c\u043d\u0438\u0439 \u0442\u0430\u043d\u043a", "printhead": "\u0414\u0440\u0443\u043a", "toner": "\u0422\u043e\u043d\u0435\u0440", "tonercartridge": "\u0422\u043e\u043d\u0435\u0440" @@ -60,10 +61,10 @@ "device_status": { "name": "\u0421\u0442\u0430\u0442\u0443\u0441", "state": { - "off": "\u041d\u0435 \u0432\u0438\u0441\u0442\u0430\u0447\u0430\u0442\u0438", "canceljob": "\u0421\u043a\u0430\u0441\u0443\u0432\u0430\u043d\u043d\u044f \u0440\u043e\u0431\u043e\u0442\u0438", "copying": "\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u043d\u043d\u044f", "inpowersave": "\u0411\u0435\u0437\u0442\u0443\u0440\u0431\u043e\u0442\u043d\u0438\u0439", + "off": "\u041d\u0435 \u0432\u0438\u0441\u0442\u0430\u0447\u0430\u0442\u0438", "processing": "\u0414\u0440\u0443\u043a", "ready": "\u041d\u0430", "scanprocessing": "\u0421\u043a\u0430\u043d\u0443\u0432\u0430\u043d\u043d\u044f"