From a1d8e7756a3396316696df5aa26eab6c4314ae50 Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:40:20 -0500 Subject: [PATCH 01/12] include new config flow value --- custom_components/vesync/translations/en.json | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/custom_components/vesync/translations/en.json b/custom_components/vesync/translations/en.json index 2d9916a..15b296f 100644 --- a/custom_components/vesync/translations/en.json +++ b/custom_components/vesync/translations/en.json @@ -6,7 +6,8 @@ }, "config": { "abort": { - "single_instance_allowed": "Already configured. Only a single configuration possible." + "already_configured": "VeSync account is already configured", + "reauth_successful": "Reauthentication was successful" }, "error": { "invalid_auth": "Invalid authentication" @@ -15,10 +16,28 @@ "user": { "data": { "password": "Password", - "username": "Email" + "username": "Email", + "polling_interval": "Polling interval (seconds)" }, "title": "Enter Username and Password" + }, + "reauth_confirm": { + "data": { + "email": "Email", + "password": "Password", + "polling_interval": "Polling interval (seconds)" + }, + "title": "Reauthenticate with your VeSync credentials" } } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds)" + } + } + } } -} \ No newline at end of file +} From 88044fb6d1c3d01f192399f3ca45bddca988f701 Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:41:53 -0500 Subject: [PATCH 02/12] Add new config flow values for non-en languages Added "(Needs Translation)" to strings that are new --- custom_components/vesync/translations/bg.json | 29 ++++++++++++++++-- custom_components/vesync/translations/ca.json | 25 ++++++++++++++-- custom_components/vesync/translations/cs.json | 25 ++++++++++++++-- custom_components/vesync/translations/da.json | 29 ++++++++++++++++-- custom_components/vesync/translations/de.json | 25 ++++++++++++++-- custom_components/vesync/translations/el.json | 25 ++++++++++++++-- .../vesync/translations/es-419.json | 29 ++++++++++++++++-- custom_components/vesync/translations/es.json | 25 ++++++++++++++-- custom_components/vesync/translations/et.json | 25 ++++++++++++++-- custom_components/vesync/translations/fr.json | 23 ++++++++++++-- custom_components/vesync/translations/he.json | 25 ++++++++++++++-- custom_components/vesync/translations/hu.json | 25 ++++++++++++++-- custom_components/vesync/translations/id.json | 25 ++++++++++++++-- custom_components/vesync/translations/it.json | 25 ++++++++++++++-- custom_components/vesync/translations/ja.json | 25 ++++++++++++++-- custom_components/vesync/translations/ko.json | 25 ++++++++++++++-- custom_components/vesync/translations/lb.json | 25 ++++++++++++++-- custom_components/vesync/translations/lv.json | 30 +++++++++++++++++-- custom_components/vesync/translations/nl.json | 25 ++++++++++++++-- custom_components/vesync/translations/no.json | 25 ++++++++++++++-- custom_components/vesync/translations/pl.json | 25 ++++++++++++++-- .../vesync/translations/pt-BR.json | 30 +++++++++++++++++-- custom_components/vesync/translations/pt.json | 25 ++++++++++++++-- custom_components/vesync/translations/ru.json | 25 ++++++++++++++-- custom_components/vesync/translations/sk.json | 28 +++++++++++++++-- custom_components/vesync/translations/sl.json | 29 ++++++++++++++++-- custom_components/vesync/translations/sv.json | 29 ++++++++++++++++-- custom_components/vesync/translations/tr.json | 25 ++++++++++++++-- custom_components/vesync/translations/uk.json | 25 ++++++++++++++-- .../vesync/translations/zh-Hans.json | 26 ++++++++++++++-- .../vesync/translations/zh-Hant.json | 25 ++++++++++++++-- 31 files changed, 724 insertions(+), 83 deletions(-) diff --git a/custom_components/vesync/translations/bg.json b/custom_components/vesync/translations/bg.json index 57c7695..ddfc129 100644 --- a/custom_components/vesync/translations/bg.json +++ b/custom_components/vesync/translations/bg.json @@ -1,5 +1,5 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } @@ -9,9 +9,34 @@ "user": { "data": { "password": "\u041f\u0430\u0440\u043e\u043b\u0430", - "username": "E-mail \u0430\u0434\u0440\u0435\u0441" + "username": "E-mail \u0430\u0434\u0440\u0435\u0441", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "\u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u043e \u0438\u043c\u0435 \u0438 \u043f\u0430\u0440\u043e\u043b\u0430" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + }, + "abort": { + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" + }, + "error": { + "invalid_auth": "Invalid authentication (Needs Translation)" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/ca.json b/custom_components/vesync/translations/ca.json index cde8de3..b278361 100644 --- a/custom_components/vesync/translations/ca.json +++ b/custom_components/vesync/translations/ca.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Ja configurat. Nom\u00e9s \u00e9s possible una sola configuraci\u00f3." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Autenticaci\u00f3 inv\u00e0lida" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Contrasenya", - "username": "Correu electr\u00f2nic" + "username": "Correu electr\u00f2nic", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Introdueix el nom d'usuari i contrasenya" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/cs.json b/custom_components/vesync/translations/cs.json index 06f8c8c..4e4a1f1 100644 --- a/custom_components/vesync/translations/cs.json +++ b/custom_components/vesync/translations/cs.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Ji\u017e nastaveno. Je mo\u017en\u00e1 pouze jedin\u00e1 konfigurace." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Neplatn\u00e9 ov\u011b\u0159en\u00ed" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Heslo", - "username": "E-mail" + "username": "E-mail", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Zadejte u\u017eivatelsk\u00e9 jm\u00e9no a heslo" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/da.json b/custom_components/vesync/translations/da.json index c2e7932..89b1fd5 100644 --- a/custom_components/vesync/translations/da.json +++ b/custom_components/vesync/translations/da.json @@ -1,5 +1,5 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } @@ -9,9 +9,34 @@ "user": { "data": { "password": "Adgangskode", - "username": "Emailadresse" + "username": "Emailadresse", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Indtast brugernavn og adgangskode" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + }, + "abort": { + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" + }, + "error": { + "invalid_auth": "Invalid authentication (Needs Translation)" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/de.json b/custom_components/vesync/translations/de.json index c2064dc..3dd00fa 100644 --- a/custom_components/vesync/translations/de.json +++ b/custom_components/vesync/translations/de.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Bereits konfiguriert. Nur eine einzige Konfiguration m\u00f6glich." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Ung\u00fcltige Authentifizierung" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Passwort", - "username": "E-Mail" + "username": "E-Mail", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Benutzername und Passwort eingeben" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/el.json b/custom_components/vesync/translations/el.json index 4d2e826..39953d8 100644 --- a/custom_components/vesync/translations/el.json +++ b/custom_components/vesync/translations/el.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "\u0388\u03c7\u03b5\u03b9 \u03ae\u03b4\u03b7 \u03c1\u03c5\u03b8\u03bc\u03b9\u03c3\u03c4\u03b5\u03af. \u039c\u03cc\u03bd\u03bf \u03bc\u03af\u03b1 \u03b4\u03b9\u03b1\u03bc\u03cc\u03c1\u03c6\u03c9\u03c3\u03b7 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03c5\u03bd\u03b1\u03c4\u03ae." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03ad\u03bb\u03b5\u03b3\u03c7\u03bf\u03c2 \u03c4\u03b1\u03c5\u03c4\u03cc\u03c4\u03b7\u03c4\u03b1\u03c2" @@ -15,9 +16,27 @@ "user": { "data": { "password": "\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7\u03c2", - "username": "Email" + "username": "Email", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "\u0395\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03cc\u03bd\u03bf\u03bc\u03b1 \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7 \u03ba\u03b1\u03b9 \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7\u03c2" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/es-419.json b/custom_components/vesync/translations/es-419.json index 907a37c..486ffa9 100644 --- a/custom_components/vesync/translations/es-419.json +++ b/custom_components/vesync/translations/es-419.json @@ -1,5 +1,5 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } @@ -9,9 +9,34 @@ "user": { "data": { "password": "Contrase\u00f1a", - "username": "Direcci\u00f3n de correo electr\u00f3nico" + "username": "Direcci\u00f3n de correo electr\u00f3nico", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Ingrese nombre de usuario y contrase\u00f1a" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + }, + "abort": { + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" + }, + "error": { + "invalid_auth": "Invalid authentication (Needs Translation)" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/es.json b/custom_components/vesync/translations/es.json index 0552ccd..38ba8d2 100644 --- a/custom_components/vesync/translations/es.json +++ b/custom_components/vesync/translations/es.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Ya est\u00e1 configurado. Solo es posible una \u00fanica configuraci\u00f3n." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Autenticaci\u00f3n no v\u00e1lida" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Contrase\u00f1a", - "username": "Correo electr\u00f3nico" + "username": "Correo electr\u00f3nico", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Introduzca el nombre de usuario y la contrase\u00f1a" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/et.json b/custom_components/vesync/translations/et.json index c172323..6abb04a 100644 --- a/custom_components/vesync/translations/et.json +++ b/custom_components/vesync/translations/et.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Juba seadistatud. V\u00f5imalik on ainult \u00fcks seadistamine." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Tuvastamise viga" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Salas\u00f5na", - "username": "E-post" + "username": "E-post", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Sisesta kasutajanimi ja salas\u00f5na" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/fr.json b/custom_components/vesync/translations/fr.json index 8b90d36..4884e75 100644 --- a/custom_components/vesync/translations/fr.json +++ b/custom_components/vesync/translations/fr.json @@ -6,7 +6,8 @@ }, "config": { "abort": { - "single_instance_allowed": "D\u00e9j\u00e0 configur\u00e9. Une seule configuration possible." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Authentification invalide" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Mot de passe", - "username": "Email" + "username": "Email", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Entrez vos identifiants" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/he.json b/custom_components/vesync/translations/he.json index 4cabea9..61cad54 100644 --- a/custom_components/vesync/translations/he.json +++ b/custom_components/vesync/translations/he.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "\u05ea\u05e6\u05d5\u05e8\u05ea\u05d5 \u05db\u05d1\u05e8 \u05e0\u05e7\u05d1\u05e2\u05d4. \u05e8\u05e7 \u05ea\u05e6\u05d5\u05e8\u05d4 \u05d0\u05d7\u05ea \u05d0\u05e4\u05e9\u05e8\u05d9\u05ea." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "\u05d0\u05d9\u05de\u05d5\u05ea \u05dc\u05d0 \u05d7\u05d5\u05e7\u05d9" @@ -15,9 +16,27 @@ "user": { "data": { "password": "\u05e1\u05d9\u05e1\u05de\u05d4", - "username": "\u05d3\u05d5\u05d0\"\u05dc" + "username": "\u05d3\u05d5\u05d0\"\u05dc", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "\u05d4\u05d6\u05df \u05e9\u05dd \u05de\u05e9\u05ea\u05de\u05e9 \u05d5\u05e1\u05d9\u05e1\u05de\u05d4" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/hu.json b/custom_components/vesync/translations/hu.json index a0c0f25..9c2c666 100644 --- a/custom_components/vesync/translations/hu.json +++ b/custom_components/vesync/translations/hu.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "M\u00e1r konfigur\u00e1lva van. Csak egy konfigur\u00e1ci\u00f3 lehets\u00e9ges." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "\u00c9rv\u00e9nytelen hiteles\u00edt\u00e9s" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Jelsz\u00f3", - "username": "E-mail" + "username": "E-mail", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "\u00cdrja be a felhaszn\u00e1l\u00f3nevet \u00e9s a jelsz\u00f3t" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/id.json b/custom_components/vesync/translations/id.json index 8edfdd4..2e81655 100644 --- a/custom_components/vesync/translations/id.json +++ b/custom_components/vesync/translations/id.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Sudah dikonfigurasi. Hanya satu konfigurasi yang diizinkan." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Autentikasi tidak valid" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Kata Sandi", - "username": "Email" + "username": "Email", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Masukkan Nama Pengguna dan Kata Sandi" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/it.json b/custom_components/vesync/translations/it.json index e04163c..5f75223 100644 --- a/custom_components/vesync/translations/it.json +++ b/custom_components/vesync/translations/it.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Gi\u00e0 configurato. \u00c8 possibile una sola configurazione." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Autenticazione non valida" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Password", - "username": "Email" + "username": "Email", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Immettere nome utente e password" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/ja.json b/custom_components/vesync/translations/ja.json index 3d0b755..1ef25d1 100644 --- a/custom_components/vesync/translations/ja.json +++ b/custom_components/vesync/translations/ja.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "\u3059\u3067\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5358\u4e00\u306e\u8a2d\u5b9a\u3057\u304b\u3067\u304d\u307e\u305b\u3093\u3002" + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "\u7121\u52b9\u306a\u8a8d\u8a3c" @@ -15,9 +16,27 @@ "user": { "data": { "password": "\u30d1\u30b9\u30ef\u30fc\u30c9", - "username": "E\u30e1\u30fc\u30eb" + "username": "E\u30e1\u30fc\u30eb", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/ko.json b/custom_components/vesync/translations/ko.json index 71c6a84..521288a 100644 --- a/custom_components/vesync/translations/ko.json +++ b/custom_components/vesync/translations/ko.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "\uc774\ubbf8 \uad6c\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \ud558\ub098\uc758 \uc778\uc2a4\ud134\uc2a4\ub9cc \uad6c\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "\uc778\uc99d\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4" @@ -15,9 +16,27 @@ "user": { "data": { "password": "\ube44\ubc00\ubc88\ud638", - "username": "\uc774\uba54\uc77c" + "username": "\uc774\uba54\uc77c", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "\uc0ac\uc6a9\uc790 \uc774\ub984\uacfc \ube44\ubc00\ubc88\ud638\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/lb.json b/custom_components/vesync/translations/lb.json index dd3eb52..c972b3b 100644 --- a/custom_components/vesync/translations/lb.json +++ b/custom_components/vesync/translations/lb.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Scho konfigur\u00e9iert. N\u00ebmmen eng eenzeg Konfiguratioun m\u00e9iglech." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Ong\u00eblteg Authentifikatioun" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Passwuert", - "username": "E-Mail" + "username": "E-Mail", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Benotzernumm a Passwuert aginn" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/lv.json b/custom_components/vesync/translations/lv.json index 5e0dd15..891e35d 100644 --- a/custom_components/vesync/translations/lv.json +++ b/custom_components/vesync/translations/lv.json @@ -1,5 +1,5 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } @@ -9,7 +9,33 @@ "user": { "data": { "password": "Parole", - "username": "E-pasta adrese" + "username": "E-pasta adrese", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Enter Username and Password (Needs Translation)" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + }, + "abort": { + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" + }, + "error": { + "invalid_auth": "Invalid authentication (Needs Translation)" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" } } } diff --git a/custom_components/vesync/translations/nl.json b/custom_components/vesync/translations/nl.json index 52ab0e7..602ef75 100644 --- a/custom_components/vesync/translations/nl.json +++ b/custom_components/vesync/translations/nl.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Al geconfigureerd. Slecht \u00e9\u00e9n configuratie mogelijk." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Ongeldige authenticatie" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Wachtwoord", - "username": "E-mail" + "username": "E-mail", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Voer gebruikersnaam en wachtwoord in" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/no.json b/custom_components/vesync/translations/no.json index 6f1095e..8a4d49b 100644 --- a/custom_components/vesync/translations/no.json +++ b/custom_components/vesync/translations/no.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Allerede konfigurert. Bare \u00e9n enkelt konfigurasjon er mulig." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Ugyldig godkjenning" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Passord", - "username": "E-post" + "username": "E-post", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Fyll inn brukernavn og passord" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/pl.json b/custom_components/vesync/translations/pl.json index 000ed02..07b40ec 100644 --- a/custom_components/vesync/translations/pl.json +++ b/custom_components/vesync/translations/pl.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Ju\u017c skonfigurowano. Mo\u017cliwa jest tylko jedna konfiguracja." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Niepoprawne uwierzytelnienie" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Has\u0142o", - "username": "Adres e-mail" + "username": "Adres e-mail", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Wprowad\u017a nazw\u0119 u\u017cytkownika i has\u0142o." + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/pt-BR.json b/custom_components/vesync/translations/pt-BR.json index 9d6f8a7..0387306 100644 --- a/custom_components/vesync/translations/pt-BR.json +++ b/custom_components/vesync/translations/pt-BR.json @@ -1,5 +1,5 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } @@ -10,7 +10,33 @@ }, "step": { "user": { - "title": "Digite o nome de usu\u00e1rio e a senha" + "title": "Digite o nome de usu\u00e1rio e a senha", + "data": { + "password": "Password (Needs Translation)", + "username": "Email (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + }, + "abort": { + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/pt.json b/custom_components/vesync/translations/pt.json index f0dc372..9d48b49 100644 --- a/custom_components/vesync/translations/pt.json +++ b/custom_components/vesync/translations/pt.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "J\u00e1 configurado. Apenas uma \u00fanica configura\u00e7\u00e3o \u00e9 poss\u00edvel." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Autentica\u00e7\u00e3o inv\u00e1lida" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Palavra-passe", - "username": "Endere\u00e7o de email" + "username": "Endere\u00e7o de email", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Introduza o nome de utilizador e a palavra-passe" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/ru.json b/custom_components/vesync/translations/ru.json index 41d7a52..b943694 100644 --- a/custom_components/vesync/translations/ru.json +++ b/custom_components/vesync/translations/ru.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438." @@ -15,9 +16,27 @@ "user": { "data": { "password": "\u041f\u0430\u0440\u043e\u043b\u044c", - "username": "\u0410\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b" + "username": "\u0410\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "VeSync" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/sk.json b/custom_components/vesync/translations/sk.json index ea2694d..a4ceb40 100644 --- a/custom_components/vesync/translations/sk.json +++ b/custom_components/vesync/translations/sk.json @@ -1,5 +1,5 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } @@ -11,7 +11,31 @@ "step": { "user": { "data": { - "username": "Email" + "username": "Email", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Enter Username and Password (Needs Translation)" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + }, + "abort": { + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" } } } diff --git a/custom_components/vesync/translations/sl.json b/custom_components/vesync/translations/sl.json index 84d7674..0421df7 100644 --- a/custom_components/vesync/translations/sl.json +++ b/custom_components/vesync/translations/sl.json @@ -1,5 +1,5 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } @@ -9,9 +9,34 @@ "user": { "data": { "password": "Geslo", - "username": "E-po\u0161tni naslov" + "username": "E-po\u0161tni naslov", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Vnesite uporabni\u0161ko Ime in Geslo" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + }, + "abort": { + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" + }, + "error": { + "invalid_auth": "Invalid authentication (Needs Translation)" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/sv.json b/custom_components/vesync/translations/sv.json index 02e5b37..324f754 100644 --- a/custom_components/vesync/translations/sv.json +++ b/custom_components/vesync/translations/sv.json @@ -1,5 +1,5 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } @@ -9,9 +9,34 @@ "user": { "data": { "password": "L\u00f6senord", - "username": "E-postadress" + "username": "E-postadress", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Ange anv\u00e4ndarnamn och l\u00f6senord" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + }, + "abort": { + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" + }, + "error": { + "invalid_auth": "Invalid authentication (Needs Translation)" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/tr.json b/custom_components/vesync/translations/tr.json index 8aa60ea..62f89f3 100644 --- a/custom_components/vesync/translations/tr.json +++ b/custom_components/vesync/translations/tr.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "Zaten yap\u0131land\u0131r\u0131lm\u0131\u015f. Yaln\u0131zca tek bir konfig\u00fcrasyon m\u00fcmk\u00fcnd\u00fcr." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "Ge\u00e7ersiz kimlik do\u011frulama" @@ -15,9 +16,27 @@ "user": { "data": { "password": "Parola", - "username": "E-posta" + "username": "E-posta", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "Kullan\u0131c\u0131 Ad\u0131 ve \u015eifre Girin" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/uk.json b/custom_components/vesync/translations/uk.json index c138437..0adfbaf 100644 --- a/custom_components/vesync/translations/uk.json +++ b/custom_components/vesync/translations/uk.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u0432\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e. \u041c\u043e\u0436\u043d\u0430 \u0434\u043e\u0434\u0430\u0442\u0438 \u043b\u0438\u0448\u0435 \u043e\u0434\u043d\u0443 \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u044e." + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "\u041d\u0435\u0432\u0456\u0440\u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0446\u0456\u044f." @@ -15,9 +16,27 @@ "user": { "data": { "password": "\u041f\u0430\u0440\u043e\u043b\u044c", - "username": "\u0410\u0434\u0440\u0435\u0441\u0430 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438" + "username": "\u0410\u0434\u0440\u0435\u0441\u0430 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "VeSync" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/zh-Hans.json b/custom_components/vesync/translations/zh-Hans.json index 421e0ec..4d4f6fe 100644 --- a/custom_components/vesync/translations/zh-Hans.json +++ b/custom_components/vesync/translations/zh-Hans.json @@ -1,5 +1,5 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } @@ -12,9 +12,31 @@ "user": { "data": { "password": "\u5bc6\u7801", - "username": "\u7535\u5b50\u90ae\u4ef6" + "username": "\u7535\u5b50\u90ae\u4ef6", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + }, + "abort": { + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } diff --git a/custom_components/vesync/translations/zh-Hant.json b/custom_components/vesync/translations/zh-Hant.json index 92963fd..e85e105 100644 --- a/custom_components/vesync/translations/zh-Hant.json +++ b/custom_components/vesync/translations/zh-Hant.json @@ -1,12 +1,13 @@ { -"device_automation": { + "device_automation": { "action_type": { "set_mode": "Change mode on {entity_name}." } }, "config": { "abort": { - "single_instance_allowed": "\u50c5\u80fd\u8a2d\u5b9a\u4e00\u7d44\u88dd\u7f6e\u3002" + "already_configured": "VeSync account is already configured (Needs Translation)", + "reauth_successful": "Reauthentication was successful (Needs Translation)" }, "error": { "invalid_auth": "\u9a57\u8b49\u78bc\u7121\u6548" @@ -15,9 +16,27 @@ "user": { "data": { "password": "\u5bc6\u78bc", - "username": "\u96fb\u5b50\u90f5\u4ef6" + "username": "\u96fb\u5b50\u90f5\u4ef6", + "polling_interval": "Polling interval (seconds) (Needs Translation)" }, "title": "\u8acb\u8f38\u5165\u4f7f\u7528\u8005\u540d\u7a31\u8207\u5bc6\u78bc" + }, + "reauth_confirm": { + "data": { + "email": "Email (Needs Translation)", + "password": "Password (Needs Translation)", + "polling_interval": "Polling interval (seconds) (Needs Translation)" + }, + "title": "Reauthenticate with your VeSync credentials (Needs Translation)" + } + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds) (Needs Translation)" + } } } } From 77004e0c3e96f65cf71b6fdc131b3674930fbc5c Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:44:23 -0500 Subject: [PATCH 03/12] add new config flow/options flow keys --- custom_components/vesync/strings.json | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/custom_components/vesync/strings.json b/custom_components/vesync/strings.json index f700c0f..90ed134 100644 --- a/custom_components/vesync/strings.json +++ b/custom_components/vesync/strings.json @@ -13,7 +13,16 @@ "description": "Custom component for Home Assistant to interact with smart devices via the VeSync platform.", "data": { "username": "[%key:common::config_flow::data::email%]", - "password": "[%key:common::config_flow::data::password%]" + "password": "[%key:common::config_flow::data::password%]", + "polling_interval": "Polling interval (seconds)" + } + }, + "reauth_confirm": { + "title": "Reauthenticate with your VeSync credentials", + "data": { + "username": "[%key:common::config_flow::data::email%]", + "password": "[%key:common::config_flow::data::password%]", + "polling_interval": "Polling interval (seconds)" } } }, @@ -21,7 +30,17 @@ "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]" }, "abort": { - "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" + "already_configured": "VeSync account is already configured", + "reauth_successful": "Reauthentication was successful" + } + }, + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds)" + } + } } } } From 7c2feaeea5864293ce06653db70b3eb488bcdf53 Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:07:42 -0500 Subject: [PATCH 04/12] rework config flow, add reauth flow, add options flow, remove single instance check --- custom_components/vesync/config_flow.py | 181 ++++++++++++++++++------ 1 file changed, 141 insertions(+), 40 deletions(-) diff --git a/custom_components/vesync/config_flow.py b/custom_components/vesync/config_flow.py index 7573cf4..2d1808e 100644 --- a/custom_components/vesync/config_flow.py +++ b/custom_components/vesync/config_flow.py @@ -1,7 +1,10 @@ """Config flow utilities.""" +from __future__ import annotations + +from collections.abc import Mapping import logging -from collections import OrderedDict +from typing import Any import voluptuous as vol from homeassistant import config_entries @@ -9,61 +12,133 @@ from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult +import homeassistant.helpers.config_validation as cv from pyvesync.vesync import VeSync -from .const import DOMAIN +from .const import DOMAIN, POLLING_INTERVAL _LOGGER = logging.getLogger(__name__) +DATA_SCHEMA = vol.Schema( + { + vol.Required(CONF_USERNAME): cv.string, + vol.Required(CONF_PASSWORD): cv.string, + vol.Required(POLLING_INTERVAL, default=60): int, + } +) + + +def reauth_schema( + def_username: str | vol.UNDEFINED = vol.UNDEFINED, + def_password: str | vol.UNDEFINED = vol.UNDEFINED, + def_poll: int | vol.UNDEFINED = 60, +) -> dict[vol.Marker, Any]: + """Return schema for reauth flow with optional default value.""" + + return { + vol.Required(CONF_USERNAME, default=def_username): cv.string, + vol.Required(CONF_PASSWORD, default=def_password): cv.string, + vol.Required(POLLING_INTERVAL, default=def_poll): int, + } + + class VeSyncFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): """Handle a config flow.""" - VERSION = 1 + VERSION = 2 - def __init__(self) -> None: - """Instantiate config flow.""" - self._username = None - self._password = None - self.data_schema = OrderedDict() - self.data_schema[vol.Required(CONF_USERNAME)] = str - self.data_schema[vol.Required(CONF_PASSWORD)] = str + entry: config_entries.ConfigEntry | None + @staticmethod @callback - def _show_form(self, errors=None): - """Show form to the user.""" + def async_get_options_flow( + config_entry: config_entries.ConfigEntry, + ) -> VeSyncOptionsFlowHandler: + """Get the options flow for this handler.""" + + return VeSyncOptionsFlowHandler() + + async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult: + """Handle re-authentication with VeSync.""" + + self.entry = self.hass.config_entries.async_get_entry(self.context["entry_id"]) + return await self.async_step_reauth_confirm() + + async def async_step_reauth_confirm( + self, user_input: dict[str, Any] | None = None + ) -> FlowResult: + """Confirm re-authentication with VeSync.""" + + errors: dict[str, str] = {} + if user_input: + username = user_input[CONF_USERNAME] + password = user_input[CONF_PASSWORD] + polling_interval = user_input[POLLING_INTERVAL] + manager = VeSync(username, password) + login = await self.hass.async_add_executor_job(manager.login) + if not login: + errors["base"] = "invalid_auth" + else: + assert self.entry is not None + + self.hass.config_entries.async_update_entry( + self.entry, + data={ + **self.entry.data, + CONF_USERNAME: username, + CONF_PASSWORD: password, + }, + options={ + POLLING_INTERVAL: polling_interval, + }, + ) + + await self.hass.config_entries.async_reload(self.entry.entry_id) + return self.async_abort(reason="reauth_successful") + return self.async_show_form( - step_id="user", - data_schema=vol.Schema(self.data_schema), - errors=errors or {}, + step_id="reauth_confirm", + data_schema=vol.Schema( + reauth_schema( + self.entry.data[CONF_USERNAME], + self.entry.data[CONF_PASSWORD], + self.entry.options[POLLING_INTERVAL], + ) + ), + errors=errors, ) - async def async_step_user(self, user_input=None): + async def async_step_user( + self, user_input: dict[str, Any] | None = None + ) -> FlowResult: """Handle a flow start.""" - if self._async_current_entries(): - return self.async_abort(reason="single_instance_allowed") - - if not user_input: - return self._show_form() - - self._username = user_input[CONF_USERNAME] - self._password = user_input[CONF_PASSWORD] - - manager = VeSync(self._username, self._password) - login = await self.hass.async_add_executor_job(manager.login) - await self.async_set_unique_id(f"{self._username}-{manager.account_id}") - self._abort_if_unique_id_configured() - - return ( - self.async_create_entry( - title=self._username, - data={ - CONF_USERNAME: self._username, - CONF_PASSWORD: self._password, - }, - ) - if login - else self._show_form(errors={"base": "invalid_auth"}) + + errors: dict[str, str] = {} + + if user_input: + username = user_input[CONF_USERNAME] + password = user_input[CONF_PASSWORD] + polling_interval = user_input[POLLING_INTERVAL] + manager = VeSync(username, password) + login = await self.hass.async_add_executor_job(manager.login) + if not login: + errors["base"] = "invalid_auth" + else: + await self.async_set_unique_id(f"{username}-{manager.account_id}") + self._abort_if_unique_id_configured() + + return self.async_create_entry( + title=username, + data={CONF_USERNAME: username, CONF_PASSWORD: password}, + options={ + POLLING_INTERVAL: polling_interval, + }, + ) + return self.async_show_form( + step_id="user", + data_schema=DATA_SCHEMA, + errors=errors, ) async def async_step_dhcp(self, discovery_info: dhcp.DhcpServiceInfo) -> FlowResult: @@ -73,3 +148,29 @@ async def async_step_dhcp(self, discovery_info: dhcp.DhcpServiceInfo) -> FlowRes _LOGGER.debug("DHCP discovery detected device %s", hostname) self.context["title_placeholders"] = {"gateway_id": hostname} return await self.async_step_user() + + +class VeSyncOptionsFlowHandler(config_entries.OptionsFlow): + """Handle VeSync integration options.""" + + async def async_step_init(self, user_input=None): + """Manage options.""" + + return await self.async_step_vesync_options() + + async def async_step_vesync_options(self, user_input=None): + """Manage the VeSync options.""" + + if user_input is not None: + return self.async_create_entry(title="", data=user_input) + + options = { + vol.Required( + POLLING_INTERVAL, + default=self.config_entry.options.get(POLLING_INTERVAL, 60), + ): int, + } + + return self.async_show_form( + step_id="vesync_options", data_schema=vol.Schema(options) + ) From 43143a263ef893fe81bbef173b71b18f11937488 Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:53:56 -0500 Subject: [PATCH 05/12] trigger reauth flow if login fails, use config polling interval, migrate entry, add update listener --- custom_components/vesync/__init__.py | 58 ++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/custom_components/vesync/__init__.py b/custom_components/vesync/__init__.py index eb64116..0f6e533 100644 --- a/custom_components/vesync/__init__.py +++ b/custom_components/vesync/__init__.py @@ -6,6 +6,7 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, Platform from homeassistant.core import HomeAssistant, ServiceCall +from homeassistant.exceptions import ConfigEntryAuthFailed from homeassistant.helpers import config_validation as cv from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed @@ -14,7 +15,9 @@ from .common import async_process_devices from .const import ( DOMAIN, + POLLING_INTERVAL, SERVICE_UPDATE_DEVS, + UPDATE_LISTENER, VS_BINARY_SENSORS, VS_BUTTON, VS_DISCOVERY, @@ -56,7 +59,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b if not login: _LOGGER.error("Unable to login to the VeSync server") - return False + raise ConfigEntryAuthFailed("Error logging in with username and password") hass.data[DOMAIN] = {config_entry.entry_id: {}} hass.data[DOMAIN][config_entry.entry_id][VS_MANAGER] = manager @@ -74,11 +77,11 @@ async def async_update_data(): _LOGGER, name="vesync", update_method=async_update_data, - update_interval=timedelta(seconds=30), + update_interval=timedelta(seconds=config_entry.options[POLLING_INTERVAL]), ) # Fetch initial data so we have data when entities subscribe - await coordinator.async_refresh() + await coordinator.async_config_entry_first_refresh() # Store the coordinator instance in hass.data hass.data[DOMAIN][config_entry.entry_id]["coordinator"] = coordinator @@ -92,8 +95,15 @@ async def async_update_data(): hass.data[DOMAIN][config_entry.entry_id][vs_p].extend(device_dict[vs_p]) platforms_list.append(p) + # Store loaded platforms + hass.data[DOMAIN][config_entry.entry_id]["loaded_platforms"] = platforms_list + await hass.config_entries.async_forward_entry_setups(config_entry, platforms_list) + # Add update listener and store it + update_listener = config_entry.add_update_listener(async_update_options) + hass.data[DOMAIN][config_entry.entry_id][UPDATE_LISTENER] = update_listener + async def async_new_device_discovery(service: ServiceCall) -> None: """Discover if new devices should be added.""" manager = hass.data[DOMAIN][config_entry.entry_id][VS_MANAGER] @@ -131,10 +141,42 @@ async def _add_new_devices(platform: str) -> None: async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Unload a config entry.""" - unload_ok = await hass.config_entries.async_unload_platforms( - entry, list(PLATFORMS.keys()) - ) - if unload_ok: - hass.data[DOMAIN].pop(entry.entry_id) + loaded_platforms = hass.data[DOMAIN][entry.entry_id]["loaded_platforms"] + if unload_ok := await hass.config_entries.async_unload_platforms( + entry, loaded_platforms + ): + del hass.data[DOMAIN][entry.entry_id] + if not hass.data[DOMAIN]: + del hass.data[DOMAIN] return unload_ok + + +async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: + """Migrate old entry.""" + + if entry.version == 1: + username = entry.data[CONF_USERNAME] + password = entry.data[CONF_PASSWORD] + + _LOGGER.debug("Migrating VeSync config entry") + + hass.config_entries.async_update_entry( + entry, + version=2, + data={ + CONF_USERNAME: username, + CONF_PASSWORD: password, + }, + options={ + POLLING_INTERVAL: 60, + }, + ) + + return True + + +async def async_update_options(hass: HomeAssistant, entry: ConfigEntry) -> None: + """Update options.""" + + await hass.config_entries.async_reload(entry.entry_id) From bc551d31a85cc26e6f6e540408a928d95c8a7826 Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:57:09 -0500 Subject: [PATCH 06/12] add polling interval and update listener constants --- custom_components/vesync/const.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/vesync/const.py b/custom_components/vesync/const.py index 361e28b..70819ea 100644 --- a/custom_components/vesync/const.py +++ b/custom_components/vesync/const.py @@ -4,6 +4,8 @@ from homeassistant.const import UnitOfTemperature, UnitOfTime DOMAIN = "vesync" +POLLING_INTERVAL = "polling_interval" +UPDATE_LISTENER = "update_listener" VS_DISCOVERY = "vesync_discovery_{}" SERVICE_UPDATE_DEVS = "update_devices" From 9ef3431331cb8cec4faf012c32a2042c840609f0 Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:02:16 -0500 Subject: [PATCH 07/12] fix import sorting --- custom_components/vesync/config_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/vesync/config_flow.py b/custom_components/vesync/config_flow.py index 2d1808e..5b85292 100644 --- a/custom_components/vesync/config_flow.py +++ b/custom_components/vesync/config_flow.py @@ -2,17 +2,17 @@ from __future__ import annotations -from collections.abc import Mapping import logging +from collections.abc import Mapping from typing import Any +import homeassistant.helpers.config_validation as cv import voluptuous as vol from homeassistant import config_entries from homeassistant.components import dhcp from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult -import homeassistant.helpers.config_validation as cv from pyvesync.vesync import VeSync from .const import DOMAIN, POLLING_INTERVAL From d04f9fb30745e20eecb82a4e6633b9fbdc6c04fa Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:42:13 -0500 Subject: [PATCH 08/12] Create .python-version --- .python-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..24ee5b1 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13 From 5d011d150e8e266335c681f3cca84ab7c729579b Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:43:50 -0500 Subject: [PATCH 09/12] bump checkout, setup-python, pre-commit, use python-version file --- .github/workflows/linters.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index af63bb4..4071b6a 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -7,6 +7,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.0 - - uses: actions/setup-python@v4.7.0 - - uses: pre-commit/action@v3.0.0 + - uses: actions/checkout@v4.2.2 + - uses: actions/setup-python@v5.3.0 + with: + python-version-file: '.python-version' + - uses: pre-commit/action@v3.0.1 From 66c51797d06b5a42868180616302f3e09d2c471c Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:56:11 -0500 Subject: [PATCH 10/12] add HACS MY button, fix missing UI debug image --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bd3952..577b67b 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ This integration will override the core VeSync integration. ### HACS +[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=haext&repository=custom_vesync&category=integration) + This integration can be installed by adding this repository to HACS __AS A CUSTOM REPOSITORY__, then searching for `Custom VeSync`, and choosing install. Reboot Home Assistant and configure the 'VeSync' integration via the integrations page or press the blue button below. [![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=vesync) @@ -40,7 +42,8 @@ You can make sure the custom integration is in use by looking for the following Navigate to the Vesync integration and click on `Enable debug logging`. Restart Home Assistant. Give it a few minutes and navigate back to the Vesync integration and disable debug logging. A local log file will get downloaded to your device. -![image](https://github.com/RobertD502/custom_vesync/assets/52541649/c556458c-a0a6-4432-acec-1200fc561d79) +![image](https://github.com/user-attachments/assets/9eec21fb-5414-4fb7-8fbb-c35d24e62555) + #### YAML Method From 160a2e59d7bf30d2a2bb9f8a5fd000ca305c473f Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:05:55 -0500 Subject: [PATCH 11/12] Create release.yml --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9ec717a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: "Release" + +on: + release: + types: [published, edited] + +permissions: {} + +jobs: + release: + name: "Release" + runs-on: "ubuntu-latest" + permissions: + contents: write + steps: + - name: "Checkout the repository" + uses: "actions/checkout@v4.2.2" + + - name: "ZIP the integration directory" + shell: "bash" + run: | + cd "${{ github.workspace }}/custom_components/vesync" + zip vesync.zip -r ./ + + - name: "Upload the ZIP file to the release" + uses: softprops/action-gh-release@v0.1.15 + with: + files: ${{ github.workspace }}/custom_components/vesync/vesync.zip From 3f95f17b28de75d121107dc2bb7e11aab17de12b Mon Sep 17 00:00:00 2001 From: "Dr. Drinovac" <52541649+RobertD502@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:10:26 -0500 Subject: [PATCH 12/12] set min HA version to 2024.12, remove deprecated key, add zip release --- hacs.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hacs.json b/hacs.json index ba64f42..f497a6e 100644 --- a/hacs.json +++ b/hacs.json @@ -1,4 +1,6 @@ { "name": "Custom VeSync", - "render_readme": true + "homeassistant": "2024.12.0b0", + "zip_release": true, + "filename": "vesync.zip" }