diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5a554b2..eed7905 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,39 +1,38 @@ exclude: CHANGELOG.md minimum_pre_commit_version: 2.11.0 -default_stages: [commit, push, manual] +default_stages: [pre-commit, pre-push, manual] repos: - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + rev: 7.1.1 hooks: - id: flake8 args: [--max-line-length=88, "-j8", "--ignore=E501,W503"] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: [--filter-files] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 + rev: v1.14.0 hooks: - id: mypy - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.7.1 - hooks: - - id: prettier - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-added-large-files args: [--maxkb=800] + - id: check-ast + - id: check-docstring-first + - id: check-json - id: debug-statements - - id: detect-aws-credentials - args: [--allow-missing-credentials] - id: detect-private-key - id: end-of-file-fixer - id: forbid-new-submodules - id: mixed-line-ending - id: trailing-whitespace + - id: pretty-format-json + args: [--autofix] diff --git a/custom_components/yoin/translations/en.json b/custom_components/yoin/translations/en.json index bcd3b9b..b297113 100644 --- a/custom_components/yoin/translations/en.json +++ b/custom_components/yoin/translations/en.json @@ -1,82 +1,82 @@ { "config": { + "abort": { + "already_configured": "Account is already configured" + }, + "error": { + "cannot_connect": "Failed to connect", + "invalid_auth": "Invalid authentication", + "service_error": "Service unavailable", + "unknown": "Unexpected error" + }, "step": { "connection_init": { - "title": "New Yoin account", - "description": "Set up your Yoin user account", "data": { - "username": "Username", + "country": "Country", "password": "Password", "scan_interval": "Update interval (hours)", - "country": "Country" - } + "username": "Username" + }, + "description": "Set up your Yoin user account", + "title": "New Yoin account" } - }, + } + }, + "entity": { + "sensor": { + "customer": { + "name": "Customer" + }, + "data": { + "name": "Data" + }, + "sim_subscription": { + "name": "Subscription" + }, + "voice": { + "name": "Voice/SMS" + } + } + }, + "options": { "abort": { "already_configured": "Account is already configured" }, "error": { "cannot_connect": "Failed to connect", "invalid_auth": "Invalid authentication", - "unknown": "Unexpected error", - "service_error": "Service unavailable" - } - }, - "options": { + "service_error": "Service unavailable", + "unknown": "Unexpected error" + }, "step": { "country": { - "title": "Change your country", - "description": "This normally should not be used", "data": { "country": "Country" - } - }, - "username_password": { - "title": "Update your username and/or password", - "description": "To do when you changed your username and/or password on 'Yoin'", - "data": { - "password": "Password" - } - }, - "scan_interval": { - "title": "Update interval", - "description": "Change the update interval for refreshing the sensors", - "data": { - "scan_interval": "Update interval (hours)" - } + }, + "description": "This normally should not be used", + "title": "Change your country" }, "init": { - "title": "Change options", "menu_options": { "country": "Country", "scan_interval": "Update interval", "username_password": "User & password" - } - } - }, - "error": { - "cannot_connect": "Failed to connect", - "invalid_auth": "Invalid authentication", - "unknown": "Unexpected error", - "service_error": "Service unavailable" - }, - "abort": { - "already_configured": "Account is already configured" - } - }, - "entity": { - "sensor": { - "customer": { - "name": "Customer" - }, - "data": { - "name": "Data" + }, + "title": "Change options" }, - "voice": { - "name": "Voice/SMS" + "scan_interval": { + "data": { + "scan_interval": "Update interval (hours)" + }, + "description": "Change the update interval for refreshing the sensors", + "title": "Update interval" }, - "sim_subscription": { - "name": "Subscription" + "username_password": { + "data": { + "password": "Password" + }, + "description": "To do when you changed your username and/or password on 'Yoin'", + "title": "Update your username and/or password" } } }, diff --git a/custom_components/yoin/translations/fr.json b/custom_components/yoin/translations/fr.json index 28ac4f9..f26a494 100644 --- a/custom_components/yoin/translations/fr.json +++ b/custom_components/yoin/translations/fr.json @@ -1,67 +1,25 @@ { "config": { - "step": { - "connection_init": { - "title": "Nouveau compte Yoin", - "description": "Configurer votre compte utilisateur Yoin", - "data": { - "username": "Nom d'utilisateur", - "password": "Mot de passe", - "scan_interval": "Intervalle de mise à jour (heures)", - "country": "Pays" - } - } - }, "abort": { - "already_configured": "Le compte est déjà configuré" + "already_configured": "Le compte est d\u00e9j\u00e0 configur\u00e9" }, "error": { - "cannot_connect": "Échec de la connexion", + "cannot_connect": "\u00c9chec de la connexion", "invalid_auth": "Authentification invalide", - "unknown": "Erreur inattendue", - "service_error": "Service non disponible" - } - }, - "options": { + "service_error": "Service non disponible", + "unknown": "Erreur inattendue" + }, "step": { - "country": { - "title": "Modifier votre pays", - "description": "Cela ne devrait normalement pas être utilisé", - "data": { - "country": "Pays" - } - }, - "username_password": { - "title": "Mettre à jour votre nom d'utilisateur et/ou votre mot de passe", - "description": "À faire lorsque vous avez changé votre nom d'utilisateur et/ou votre mot de passe sur 'Yoin'", - "data": { - "password": "Mot de passe" - } - }, - "scan_interval": { - "title": "Intervalle de mise à jour", - "description": "Modifier l'intervalle de mise à jour pour actualiser les capteurs", + "connection_init": { "data": { - "scan_interval": "Intervalle de mise à jour (heures)" - } - }, - "init": { - "title": "Modifier les options", - "menu_options": { "country": "Pays", - "scan_interval": "Intervalle de mise à jour", - "username_password": "Nom d'utilisateur & mot de passe" - } + "password": "Mot de passe", + "scan_interval": "Intervalle de mise \u00e0 jour (heures)", + "username": "Nom d'utilisateur" + }, + "description": "Configurer votre compte utilisateur Yoin", + "title": "Nouveau compte Yoin" } - }, - "error": { - "cannot_connect": "Échec de la connexion", - "invalid_auth": "Authentification invalide", - "unknown": "Erreur inattendue", - "service_error": "Service non disponible" - }, - "abort": { - "already_configured": "Le compte est déjà configuré" } }, "entity": { @@ -70,13 +28,55 @@ "name": "Client" }, "data": { - "name": "Données" + "name": "Donn\u00e9es" + }, + "sim_subscription": { + "name": "Abonnement" }, "voice": { "name": "Voix/SMS" + } + } + }, + "options": { + "abort": { + "already_configured": "Le compte est d\u00e9j\u00e0 configur\u00e9" + }, + "error": { + "cannot_connect": "\u00c9chec de la connexion", + "invalid_auth": "Authentification invalide", + "service_error": "Service non disponible", + "unknown": "Erreur inattendue" + }, + "step": { + "country": { + "data": { + "country": "Pays" + }, + "description": "Cela ne devrait normalement pas \u00eatre utilis\u00e9", + "title": "Modifier votre pays" }, - "sim_subscription": { - "name": "Abonnement" + "init": { + "menu_options": { + "country": "Pays", + "scan_interval": "Intervalle de mise \u00e0 jour", + "username_password": "Nom d'utilisateur & mot de passe" + }, + "title": "Modifier les options" + }, + "scan_interval": { + "data": { + "scan_interval": "Intervalle de mise \u00e0 jour (heures)" + }, + "description": "Modifier l'intervalle de mise \u00e0 jour pour actualiser les capteurs", + "title": "Intervalle de mise \u00e0 jour" + }, + "username_password": { + "data": { + "password": "Mot de passe" + }, + "description": "\u00c0 faire lorsque vous avez chang\u00e9 votre nom d'utilisateur et/ou votre mot de passe sur 'Yoin'", + "title": "Mettre \u00e0 jour votre nom d'utilisateur et/ou votre mot de passe" } } }, diff --git a/custom_components/yoin/translations/nl.json b/custom_components/yoin/translations/nl.json index 0c893fe..55f98be 100644 --- a/custom_components/yoin/translations/nl.json +++ b/custom_components/yoin/translations/nl.json @@ -1,59 +1,24 @@ { "config": { - "step": { - "connection_init": { - "title": "Nieuwe Yoin-account", - "description": "Stel uw Yoin-gebruikersaccount in", - "data": { - "username": "Gebruikersnaam", - "password": "Wachtwoord", - "scan_interval": "Update interval (uren)" - } - } - }, "abort": { "already_configured": "Account is al geconfigureerd" }, "error": { "cannot_connect": "Verbinding mislukt", "invalid_auth": "Ongeldige authenticatie", - "unknown": "Onverwachte fout", - "service_error": "Service niet beschikbaar" - } - }, - "options": { + "service_error": "Service niet beschikbaar", + "unknown": "Onverwachte fout" + }, "step": { - "username_password": { - "title": "Update uw gebruikersnaam en/of wachtwoord", - "description": "Te doen wanneer u uw gebruikersnaam en/of wachtwoord op 'Yoin' hebt gewijzigd", - "data": { - "password": "Wachtwoord" - } - }, - "scan_interval": { - "title": "Update interval", - "description": "Wijzig het Update interval voor het vernieuwen van de sensoren", + "connection_init": { "data": { - "scan_interval": "Update interval (uren)" - } - }, - "init": { - "title": "Wijzig opties", - "menu_options": { - "country": "Land", - "scan_interval": "Update interval", - "username_password": "Gebruikersnaam & wachtwoord" - } + "password": "Wachtwoord", + "scan_interval": "Update interval (uren)", + "username": "Gebruikersnaam" + }, + "description": "Stel uw Yoin-gebruikersaccount in", + "title": "Nieuwe Yoin-account" } - }, - "error": { - "cannot_connect": "Verbinding mislukt", - "invalid_auth": "Ongeldige authenticatie", - "unknown": "Onverwachte fout", - "service_error": "Service niet beschikbaar" - }, - "abort": { - "already_configured": "Account is al geconfigureerd" } }, "entity": { @@ -64,11 +29,46 @@ "data": { "name": "Data" }, + "sim_subscription": { + "name": "Abonnement" + }, "voice": { "name": "Voice/SMS" + } + } + }, + "options": { + "abort": { + "already_configured": "Account is al geconfigureerd" + }, + "error": { + "cannot_connect": "Verbinding mislukt", + "invalid_auth": "Ongeldige authenticatie", + "service_error": "Service niet beschikbaar", + "unknown": "Onverwachte fout" + }, + "step": { + "init": { + "menu_options": { + "country": "Land", + "scan_interval": "Update interval", + "username_password": "Gebruikersnaam & wachtwoord" + }, + "title": "Wijzig opties" }, - "sim_subscription": { - "name": "Abonnement" + "scan_interval": { + "data": { + "scan_interval": "Update interval (uren)" + }, + "description": "Wijzig het Update interval voor het vernieuwen van de sensoren", + "title": "Update interval" + }, + "username_password": { + "data": { + "password": "Wachtwoord" + }, + "description": "Te doen wanneer u uw gebruikersnaam en/of wachtwoord op 'Yoin' hebt gewijzigd", + "title": "Update uw gebruikersnaam en/of wachtwoord" } } } diff --git a/custom_components/yoin/translations/pt.json b/custom_components/yoin/translations/pt.json index a918737..eedb8de 100644 --- a/custom_components/yoin/translations/pt.json +++ b/custom_components/yoin/translations/pt.json @@ -1,67 +1,25 @@ { "config": { - "step": { - "connection_init": { - "title": "Nova conta Yoin", - "description": "Configure sua conta de usuário Yoin", - "data": { - "username": "Nome de usuário", - "password": "Senha", - "scan_interval": "Intervalo de atualização (horas)", - "country": "País" - } - } - }, "abort": { - "already_configured": "A conta já está configurada" + "already_configured": "A conta j\u00e1 est\u00e1 configurada" }, "error": { "cannot_connect": "Falha ao conectar", - "invalid_auth": "Autenticação inválida", - "unknown": "Erro inesperado", - "service_error": "Serviço indisponível" - } - }, - "options": { + "invalid_auth": "Autentica\u00e7\u00e3o inv\u00e1lida", + "service_error": "Servi\u00e7o indispon\u00edvel", + "unknown": "Erro inesperado" + }, "step": { - "country": { - "title": "Alterar seu país", - "description": "Isso normalmente não deve ser usado", - "data": { - "country": "País" - } - }, - "username_password": { - "title": "Atualizar seu nome de usuário e/ou senha", - "description": "Para fazer quando você alterou seu nome de usuário e/ou senha no 'Yoin'", - "data": { - "password": "Senha" - } - }, - "scan_interval": { - "title": "Intervalo de atualização", - "description": "Alterar o intervalo de atualização para atualizar os sensores", + "connection_init": { "data": { - "scan_interval": "Intervalo de atualização (horas)" - } - }, - "init": { - "title": "Alterar opções", - "menu_options": { - "country": "País", - "scan_interval": "Intervalo de atualização", - "username_password": "Nome de usuário e senha" - } + "country": "Pa\u00eds", + "password": "Senha", + "scan_interval": "Intervalo de atualiza\u00e7\u00e3o (horas)", + "username": "Nome de usu\u00e1rio" + }, + "description": "Configure sua conta de usu\u00e1rio Yoin", + "title": "Nova conta Yoin" } - }, - "error": { - "cannot_connect": "Falha ao conectar", - "invalid_auth": "Autenticação inválida", - "unknown": "Erro inesperado", - "service_error": "Serviço indisponível" - }, - "abort": { - "already_configured": "A conta já está configurada" } }, "entity": { @@ -72,19 +30,61 @@ "data": { "name": "Dados" }, + "sim_subscription": { + "name": "Assinatura" + }, "voice": { "name": "Voz/SMS" + } + } + }, + "options": { + "abort": { + "already_configured": "A conta j\u00e1 est\u00e1 configurada" + }, + "error": { + "cannot_connect": "Falha ao conectar", + "invalid_auth": "Autentica\u00e7\u00e3o inv\u00e1lida", + "service_error": "Servi\u00e7o indispon\u00edvel", + "unknown": "Erro inesperado" + }, + "step": { + "country": { + "data": { + "country": "Pa\u00eds" + }, + "description": "Isso normalmente n\u00e3o deve ser usado", + "title": "Alterar seu pa\u00eds" }, - "sim_subscription": { - "name": "Assinatura" + "init": { + "menu_options": { + "country": "Pa\u00eds", + "scan_interval": "Intervalo de atualiza\u00e7\u00e3o", + "username_password": "Nome de usu\u00e1rio e senha" + }, + "title": "Alterar op\u00e7\u00f5es" + }, + "scan_interval": { + "data": { + "scan_interval": "Intervalo de atualiza\u00e7\u00e3o (horas)" + }, + "description": "Alterar o intervalo de atualiza\u00e7\u00e3o para atualizar os sensores", + "title": "Intervalo de atualiza\u00e7\u00e3o" + }, + "username_password": { + "data": { + "password": "Senha" + }, + "description": "Para fazer quando voc\u00ea alterou seu nome de usu\u00e1rio e/ou senha no 'Yoin'", + "title": "Atualizar seu nome de usu\u00e1rio e/ou senha" } } }, "selector": { "country": { "options": { - "be": "Bélgica", - "nl": "Países Baixos" + "be": "B\u00e9lgica", + "nl": "Pa\u00edses Baixos" } } }