diff --git a/custom_components/ecotrend_ista/__init__.py b/custom_components/ecotrend_ista/__init__.py index ae5dbba..23d7bec 100644 --- a/custom_components/ecotrend_ista/__init__.py +++ b/custom_components/ecotrend_ista/__init__.py @@ -3,13 +3,12 @@ import logging -import voluptuous as vol - from homeassistant import config_entries from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, Platform from homeassistant.core import HomeAssistant from homeassistant.helpers.typing import ConfigType +import voluptuous as vol from .const import DATA_HASS_CONFIG, DOMAIN from .const_schema import DEFAULT_DATA_SCHEMA diff --git a/custom_components/ecotrend_ista/account_de_url.json b/custom_components/ecotrend_ista/account_de_url.json index 820a8a2..f4fc9ca 100644 --- a/custom_components/ecotrend_ista/account_de_url.json +++ b/custom_components/ecotrend_ista/account_de_url.json @@ -1,38 +1,38 @@ { - "firstName": "Max", - "lastName": "Istamann", - "email": "demo@ista.de", - "keycloakId": null, - "country": "DE", - "locale": "de_DE", - "authcode": null, - "tos": "10.0", - "tosUpdated": "30.08.2021", - "privacy": null, - "mobileNumber": "123456789", - "transitionMobileNumber": "", - "unconfirmedPhoneNumber": null, - "password": null, - "enabled": true, - "consumptionUnitUuids": [ - "26e93f1a-c828-11ea-87d0-0242ac130003" - ], - "residentTimeRangeUuids": [ - "26e93f1a-c828-11ea-87d0-0242ac130003" - ], - "ads": true, - "marketing": true, - "fcmToken": "null", - "betaPhase": null, - "notificationMethod": "none", - "emailConfirmed": false, - "isDemo": true, - "userGroup": "demo", - "mobileLoginStatus": "pending", - "residentAndConsumptionUuidsMap": { - "26e93f1a-c828-11ea-87d0-0242ac130003": "26e93f1a-c828-11ea-87d0-0242ac130003" - }, - "activeConsumptionUnit": "26e93f1a-c828-11ea-87d0-0242ac130003", - "supportCode": "HFJYYWJX2", - "notificationMethodEmailConfirmed": false -} \ No newline at end of file + "activeConsumptionUnit": "26e93f1a-c828-11ea-87d0-0242ac130003", + "ads": true, + "authcode": null, + "betaPhase": null, + "consumptionUnitUuids": [ + "26e93f1a-c828-11ea-87d0-0242ac130003" + ], + "country": "DE", + "email": "demo@ista.de", + "emailConfirmed": false, + "enabled": true, + "fcmToken": "null", + "firstName": "Max", + "isDemo": true, + "keycloakId": null, + "lastName": "Istamann", + "locale": "de_DE", + "marketing": true, + "mobileLoginStatus": "pending", + "mobileNumber": "123456789", + "notificationMethod": "none", + "notificationMethodEmailConfirmed": false, + "password": null, + "privacy": null, + "residentAndConsumptionUuidsMap": { + "26e93f1a-c828-11ea-87d0-0242ac130003": "26e93f1a-c828-11ea-87d0-0242ac130003" + }, + "residentTimeRangeUuids": [ + "26e93f1a-c828-11ea-87d0-0242ac130003" + ], + "supportCode": "HFJYYWJX2", + "tos": "10.0", + "tosUpdated": "30.08.2021", + "transitionMobileNumber": "", + "unconfirmedPhoneNumber": null, + "userGroup": "demo" +} diff --git a/custom_components/ecotrend_ista/config_flow.py b/custom_components/ecotrend_ista/config_flow.py index 09acf4f..345f4cc 100644 --- a/custom_components/ecotrend_ista/config_flow.py +++ b/custom_components/ecotrend_ista/config_flow.py @@ -5,11 +5,6 @@ import logging from typing import Any -from pyecotrend_ista.exception_classes import LoginError -from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta -import requests -import voluptuous as vol - from homeassistant import config_entries, core from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from homeassistant.data_entry_flow import FlowResult @@ -18,6 +13,10 @@ NumberSelectorConfig, NumberSelectorMode, ) +from pyecotrend_ista.exception_classes import LoginError +from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta +import requests +import voluptuous as vol from .const import CONF_MFA, CONF_UPDATE_INTERVAL, CONF_URL, DOMAIN, MANUFACTURER from .const_schema import DATA_SCHEMA_EMAIL, URL_SELECTOR diff --git a/custom_components/ecotrend_ista/const_schema.py b/custom_components/ecotrend_ista/const_schema.py index b5c5140..76fe48c 100644 --- a/custom_components/ecotrend_ista/const_schema.py +++ b/custom_components/ecotrend_ista/const_schema.py @@ -1,8 +1,6 @@ """Const schema for ista EcoTrend Version 2.""" from __future__ import annotations -import voluptuous as vol - from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, CONF_SCAN_INTERVAL from homeassistant.helpers.selector import ( NumberSelector, @@ -16,6 +14,7 @@ TextSelectorConfig, TextSelectorType, ) +import voluptuous as vol from .const import ( CONF_MFA, diff --git a/custom_components/ecotrend_ista/coordinator.py b/custom_components/ecotrend_ista/coordinator.py index 450223d..192117a 100644 --- a/custom_components/ecotrend_ista/coordinator.py +++ b/custom_components/ecotrend_ista/coordinator.py @@ -8,13 +8,12 @@ import os from typing import Any -from pyecotrend_ista.helper_object_de import CustomRaw -from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta -import requests - from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.update_coordinator import DataUpdateCoordinator +from pyecotrend_ista.helper_object_de import CustomRaw +from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta +import requests from .config_flow import login_account from .const import CONF_UPDATE_INTERVAL, DOMAIN diff --git a/custom_components/ecotrend_ista/demo_de_url.json b/custom_components/ecotrend_ista/demo_de_url.json index 52776c0..b412a3e 100644 --- a/custom_components/ecotrend_ista/demo_de_url.json +++ b/custom_components/ecotrend_ista/demo_de_url.json @@ -1,343 +1,343 @@ { + "co2Emissions": null, + "co2EmissionsBillingPeriods": null, "consumptionUnitId": "26e93f1a-c828-11ea-87d0-0242ac130003", - "resident": { - "movedOut": false, - "moveOutDate": null, - "invalid": false, - "invalidDate": null - }, "consumptions": [ { "date": { "month": 5, "year": 2023 }, + "documentNumber": null, + "exception": null, "readings": [ { - "type": "heating", - "value": "35", - "unit": "Einheiten", - "additionalValue": "38,0", "additionalUnit": "kWh", - "estimated": false, + "additionalValue": "38,0", + "averageConsumption": { + "additionalAverageConsumptionPercentage": 72, + "additionalAverageConsumptionValue": "27,2", + "additionalResidentConsumptionPercentage": 100, + "additionalResidentConsumptionValue": "38,0", + "averageConsumptionPercentage": 71, + "averageConsumptionValue": "25", + "residentConsumptionPercentage": 100, + "residentConsumptionValue": "35" + }, "comparedConsumption": { + "comparedPercentage": 22, + "comparedValue": "10", "lastYearValue": 45.0, "period": { "month": 5, "year": 2022 }, - "smiley": "HAPPY", - "comparedPercentage": 22, - "comparedValue": "10" + "smiley": "HAPPY" }, "comparedCost": null, - "averageConsumption": { - "averageConsumptionValue": "25", - "residentConsumptionValue": "35", - "averageConsumptionPercentage": 71, - "residentConsumptionPercentage": 100, - "additionalAverageConsumptionValue": "27,2", - "additionalResidentConsumptionValue": "38,0", - "additionalAverageConsumptionPercentage": 72, - "additionalResidentConsumptionPercentage": 100 - } + "estimated": false, + "type": "heating", + "unit": "Einheiten", + "value": "35" }, { - "type": "warmwater", - "value": "1,0", - "unit": "m³", - "additionalValue": "57,0", "additionalUnit": "kWh", - "estimated": false, + "additionalValue": "57,0", + "averageConsumption": { + "additionalAverageConsumptionPercentage": 80, + "additionalAverageConsumptionValue": "45,6", + "additionalResidentConsumptionPercentage": 100, + "additionalResidentConsumptionValue": "57,0", + "averageConsumptionPercentage": 80, + "averageConsumptionValue": "0,8", + "residentConsumptionPercentage": 100, + "residentConsumptionValue": "1,0" + }, "comparedConsumption": { + "comparedPercentage": 43, + "comparedValue": "0,3", "lastYearValue": 0.7, "period": { "month": 5, "year": 2022 }, - "smiley": "MAD", - "comparedPercentage": 43, - "comparedValue": "0,3" + "smiley": "MAD" }, "comparedCost": null, - "averageConsumption": { - "averageConsumptionValue": "0,8", - "residentConsumptionValue": "1,0", - "averageConsumptionPercentage": 80, - "residentConsumptionPercentage": 100, - "additionalAverageConsumptionValue": "45,6", - "additionalResidentConsumptionValue": "57,0", - "additionalAverageConsumptionPercentage": 80, - "additionalResidentConsumptionPercentage": 100 - } + "estimated": false, + "type": "warmwater", + "unit": "m³", + "value": "1,0" }, { - "type": "water", - "value": "11,0", - "unit": "m³", - "additionalValue": "570,0", "additionalUnit": "kWh", - "estimated": false, + "additionalValue": "570,0", + "averageConsumption": { + "additionalAverageConsumptionPercentage": 800, + "additionalAverageConsumptionValue": "456", + "additionalResidentConsumptionPercentage": 1000, + "additionalResidentConsumptionValue": "570", + "averageConsumptionPercentage": 800, + "averageConsumptionValue": "8,0", + "residentConsumptionPercentage": 1000, + "residentConsumptionValue": "10" + }, "comparedConsumption": { + "comparedPercentage": 430, + "comparedValue": "30", "lastYearValue": 7.0, "period": { "month": 5, "year": 2022 }, - "smiley": "HAPPY", - "comparedPercentage": 430, - "comparedValue": "30" + "smiley": "HAPPY" }, "comparedCost": null, - "averageConsumption": { - "averageConsumptionValue": "8,0", - "residentConsumptionValue": "10", - "averageConsumptionPercentage": 800, - "residentConsumptionPercentage": 1000, - "additionalAverageConsumptionValue": "456", - "additionalResidentConsumptionValue": "570", - "additionalAverageConsumptionPercentage": 800, - "additionalResidentConsumptionPercentage": 1000 - } - } - ], - "exception": null, - "documentNumber": null - } - ], - "costs": [ - { - "date": { - "month": 5, - "year": 2023 - }, - "exception": null, - "costsByEnergyType": [ - { - "type": "heating", - "value": 21, - "unit": "EUR", - "estimated": false, - "comparedCost": { - "lastYearValue": 26.6, - "period": { - "month": 5, - "year": 2022 - }, - "smiley": "HAPPY", - "comparedPercentage": 22, - "comparedValue": "6" - } - }, - { - "type": "warmwater", - "value": 7, - "unit": "EUR", "estimated": false, - "comparedCost": { - "lastYearValue": 4.7, - "period": { - "month": 5, - "year": 2022 - }, - "smiley": "MAD", - "comparedPercentage": 47, - "comparedValue": "2" - } - }, - { "type": "water", - "value": 70, - "unit": "EUR", - "estimated": false, - "comparedCost": { - "lastYearValue": 47, - "period": { - "month": 5, - "year": 2022 - }, - "smiley": "HAPPY", - "comparedPercentage": 470, - "comparedValue": "20" - } + "unit": "m³", + "value": "11,0" } ] } ], - "co2Emissions": null, "consumptionsBillingPeriods": { "currentBillingPeriod": { - "timeRange": { - "start": { - "month": 7, - "year": 2022 - }, - "end": { - "month": 5, - "year": 2023 - } - }, + "exception": null, "readings": [ { - "type": "heating", - "value": "2646", - "unit": "Einheiten", - "additionalValue": "2876,0", "additionalUnit": "kWh", - "estimated": false, + "additionalValue": "2876,0", + "averageConsumption": null, "comparedConsumption": { + "comparedPercentage": 0, + "comparedValue": "2", "lastYearValue": 2648.0, "period": null, - "smiley": "HAPPY", - "comparedPercentage": 0, - "comparedValue": "2" + "smiley": "HAPPY" }, "comparedCost": null, - "averageConsumption": null + "estimated": false, + "type": "heating", + "unit": "Einheiten", + "value": "2646" }, { - "type": "warmwater", - "value": "11,1", - "unit": "m³", - "additionalValue": "642,0", "additionalUnit": "kWh", - "estimated": false, + "additionalValue": "642,0", + "averageConsumption": null, "comparedConsumption": { + "comparedPercentage": 7, + "comparedValue": "0,7", "lastYearValue": 10.4, "period": null, - "smiley": "MAD", - "comparedPercentage": 7, - "comparedValue": "0,7" + "smiley": "MAD" }, "comparedCost": null, - "averageConsumption": null + "estimated": false, + "type": "warmwater", + "unit": "m³", + "value": "11,1" } ], - "exception": null - }, - "previousBillingPeriod": { "timeRange": { - "start": { - "month": 7, - "year": 2021 - }, "end": { "month": 5, + "year": 2023 + }, + "start": { + "month": 7, "year": 2022 } - }, + } + }, + "previousBillingPeriod": { "readings": [ { - "type": "heating", - "value": "2648", - "unit": "Einheiten", - "additionalValue": "2878,2", "additionalUnit": "kWh", - "estimated": false, + "additionalValue": "2878,2", + "averageConsumption": null, "comparedConsumption": null, "comparedCost": null, - "averageConsumption": null + "estimated": false, + "type": "heating", + "unit": "Einheiten", + "value": "2648" }, { - "type": "warmwater", - "value": "10,4", - "unit": "m³", - "additionalValue": "601,4", "additionalUnit": "kWh", - "estimated": false, + "additionalValue": "601,4", + "averageConsumption": null, "comparedConsumption": null, "comparedCost": null, - "averageConsumption": null + "estimated": false, + "type": "warmwater", + "unit": "m³", + "value": "10,4" } - ] - } - }, - "costsBillingPeriods": { - "currentBillingPeriod": { + ], "timeRange": { + "end": { + "month": 5, + "year": 2022 + }, "start": { "month": 7, - "year": 2022 + "year": 2021 + } + } + } + }, + "costs": [ + { + "costsByEnergyType": [ + { + "comparedCost": { + "comparedPercentage": 22, + "comparedValue": "6", + "lastYearValue": 26.6, + "period": { + "month": 5, + "year": 2022 + }, + "smiley": "HAPPY" + }, + "estimated": false, + "type": "heating", + "unit": "EUR", + "value": 21 }, - "end": { - "month": 5, - "year": 2023 + { + "comparedCost": { + "comparedPercentage": 47, + "comparedValue": "2", + "lastYearValue": 4.7, + "period": { + "month": 5, + "year": 2022 + }, + "smiley": "MAD" + }, + "estimated": false, + "type": "warmwater", + "unit": "EUR", + "value": 7 + }, + { + "comparedCost": { + "comparedPercentage": 470, + "comparedValue": "20", + "lastYearValue": 47, + "period": { + "month": 5, + "year": 2022 + }, + "smiley": "HAPPY" + }, + "estimated": false, + "type": "water", + "unit": "EUR", + "value": 70 } + ], + "date": { + "month": 5, + "year": 2023 }, + "exception": null + } + ], + "costsBillingPeriods": { + "currentBillingPeriod": { + "exception": null, "readings": [ { - "type": "heating", - "value": "1567", - "unit": "EUR", - "additionalValue": null, "additionalUnit": "kWh", - "estimated": false, + "additionalValue": null, + "averageConsumption": null, "comparedConsumption": null, "comparedCost": { + "comparedPercentage": 0, + "comparedValue": "1", "lastYearValue": 1568.0, "period": null, - "smiley": "HAPPY", - "comparedPercentage": 0, - "comparedValue": "1" + "smiley": "HAPPY" }, - "averageConsumption": null + "estimated": false, + "type": "heating", + "unit": "EUR", + "value": "1567" }, { - "type": "warmwater", - "value": "77", - "unit": "EUR", - "additionalValue": null, "additionalUnit": "kWh", - "estimated": false, + "additionalValue": null, + "averageConsumption": null, "comparedConsumption": null, "comparedCost": { + "comparedPercentage": 7, + "comparedValue": "5", "lastYearValue": 72.0, "period": null, - "smiley": "MAD", - "comparedPercentage": 7, - "comparedValue": "5" + "smiley": "MAD" }, - "averageConsumption": null + "estimated": false, + "type": "warmwater", + "unit": "EUR", + "value": "77" } ], - "exception": null - }, - "previousBillingPeriod": { "timeRange": { - "start": { - "month": 7, - "year": 2021 - }, "end": { "month": 5, + "year": 2023 + }, + "start": { + "month": 7, "year": 2022 } - }, + } + }, + "previousBillingPeriod": { "readings": [ { - "type": "heating", - "value": "1568", - "unit": "EUR", - "additionalValue": null, "additionalUnit": "kWh", - "estimated": false, + "additionalValue": null, + "averageConsumption": null, "comparedConsumption": null, "comparedCost": null, - "averageConsumption": null + "estimated": false, + "type": "heating", + "unit": "EUR", + "value": "1568" }, { - "type": "warmwater", - "value": "72", - "unit": "EUR", - "additionalValue": null, "additionalUnit": "kWh", - "estimated": false, + "additionalValue": null, + "averageConsumption": null, "comparedConsumption": null, "comparedCost": null, - "averageConsumption": null + "estimated": false, + "type": "warmwater", + "unit": "EUR", + "value": "72" } - ] + ], + "timeRange": { + "end": { + "month": 5, + "year": 2022 + }, + "start": { + "month": 7, + "year": 2021 + } + } } }, - "co2EmissionsBillingPeriods": null -} \ No newline at end of file + "resident": { + "invalid": false, + "invalidDate": null, + "moveOutDate": null, + "movedOut": false + } +} diff --git a/custom_components/ecotrend_ista/sensor.py b/custom_components/ecotrend_ista/sensor.py index cf175cb..13c57a8 100644 --- a/custom_components/ecotrend_ista/sensor.py +++ b/custom_components/ecotrend_ista/sensor.py @@ -6,9 +6,6 @@ import logging from typing import Any, cast -from pyecotrend_ista.helper_object_de import CustomRaw -from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta - from homeassistant.components.sensor import RestoreSensor, SensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant @@ -17,6 +14,8 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import StateType from homeassistant.helpers.update_coordinator import CoordinatorEntity +from pyecotrend_ista.helper_object_de import CustomRaw +from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta from .const import ( CONF_TYPE_HEATING_CUSTOM, diff --git a/custom_components/ecotrend_ista/strings.json b/custom_components/ecotrend_ista/strings.json index 4139146..4e0630e 100644 --- a/custom_components/ecotrend_ista/strings.json +++ b/custom_components/ecotrend_ista/strings.json @@ -1,60 +1,60 @@ { - "config": { - "abort": { - "already_configured": "[%key:common::config_flow::abort::already_configured%]", - "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]", - "missing_configuration": "[%key:common::config_flow::abort::oauth2_missing_configuration%]" + "config": { + "abort": { + "already_configured": "[%key:common::config_flow::abort::already_configured%]", + "missing_configuration": "[%key:common::config_flow::abort::oauth2_missing_configuration%]", + "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" + }, + "create_entry": { + "default": "[%key:common::config_flow::create_entry::default%]" + }, + "error": { + "auth_inval": "[%key:common::config_flow::error::auth_inval%]", + "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", + "no_email": "[%key:common::config_flow::error::no_email%]", + "timeout_connect": "[%key:common::config_flow::error::timeout_connect%]", + "unknown": "[%key:common::config_flow::error::unknown%]" + }, + "step": { + "german": { + "data": { + "URL": "[%key:common::config_flow::data::URL%]", + "email": "[%key:common::config_flow::data::email%]", + "mfa_code": "[%key:common::config_flow::data::mfa_code%]", + "password": "[%key:common::config_flow::data::password%]" }, - "error": { - "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", - "auth_inval": "[%key:common::config_flow::error::auth_inval%]", - "no_email": "[%key:common::config_flow::error::no_email%]", - "timeout_connect": "[%key:common::config_flow::error::timeout_connect%]", - "unknown": "[%key:common::config_flow::error::unknown%]" + "description": "[%key:common::config_flow::german::description%]", + "title": "[%key:common::config_flow::german::title%]" + }, + "user": { + "data": { + "URL": "[%key:common::config_flow::data::URL%]", + "email": "[%key:common::config_flow::data::email%]", + "password": "[%key:common::config_flow::data::password%]" }, - "create_entry": { - "default": "[%key:common::config_flow::create_entry::default%]" + "description": "[%key:common::config_flow::german::description%]", + "menu_options": { + "denmark": "", + "francais": "https://ma-consommation.ista.lu/", + "german": "https://www.ecotrend.ista.de/", + "netherland": "https://mijn.ista.nl/" }, - "step": { - "user": { - "title": "[%key:common::config_flow::user::title%]", - "menu_options": { - "german": "https://www.ecotrend.ista.de/", - "netherland": "https://mijn.ista.nl/", - "francais": "https://ma-consommation.ista.lu/", - "denmark": "" - }, - "description": "[%key:common::config_flow::german::description%]", - "data": { - "email": "[%key:common::config_flow::data::email%]", - "password": "[%key:common::config_flow::data::password%]", - "URL": "[%key:common::config_flow::data::URL%]" - } - }, - "german": { - "title": "[%key:common::config_flow::german::title%]", - "description": "[%key:common::config_flow::german::description%]", - "data": { - "email": "[%key:common::config_flow::data::email%]", - "password": "[%key:common::config_flow::data::password%]", - "URL": "[%key:common::config_flow::data::URL%]", - "mfa_code": "[%key:common::config_flow::data::mfa_code%]" - } - } - } + "title": "[%key:common::config_flow::user::title%]" + } + } + }, + "options": { + "error": { + "not_allowed": "Die gewählte URL ist nicht erlaubt" }, - "options": { - "error": { - "not_allowed": "Die gewählte URL ist nicht erlaubt" + "step": { + "init": { + "data": { + "URL": "Login-Url", + "update_interval": "Update Interval (h)" }, - "step": { - "init": { - "title": "Einstellungen für ista EcoTrend", - "data": { - "URL": "Login-Url", - "update_interval": "Update Interval (h)" - } - } - } + "title": "Einstellungen für ista EcoTrend" + } } -} \ No newline at end of file + } +} diff --git a/custom_components/ecotrend_ista/translations/de.json b/custom_components/ecotrend_ista/translations/de.json index fc6ff52..80d6742 100644 --- a/custom_components/ecotrend_ista/translations/de.json +++ b/custom_components/ecotrend_ista/translations/de.json @@ -1,46 +1,46 @@ { - "config": { - "abort": { - "already_configured": "Integration wurde bereits konfiguriert", - "single_instance_allowed": "Bereits konfiguriert. Nur eine einzige Konfiguration m\u00f6glich." - }, - "error": { - "cannot_connect": "Verbindung fehlgeschlagen", - "auth_inval": "Login fehlgeschlagen. E-Mail-Adresse, Passwort oder Login-Url falsch.", - "not_allowed": "Die gewählte URL wird noch nicht unterstützt", - "no_email": "keine gültige Email", - "timeout_connect": "Zeitüberschreitung beim Verbindungsaufbau", - "unknown": "Unerwarteter Fehler" - }, - "create_entry": { - "default": "ista EcoTrend Integration wurde erstellt!" + "config": { + "abort": { + "already_configured": "Integration wurde bereits konfiguriert", + "single_instance_allowed": "Bereits konfiguriert. Nur eine einzige Konfiguration möglich." + }, + "create_entry": { + "default": "ista EcoTrend Integration wurde erstellt!" + }, + "error": { + "auth_inval": "Login fehlgeschlagen. E-Mail-Adresse, Passwort oder Login-Url falsch.", + "cannot_connect": "Verbindung fehlgeschlagen", + "no_email": "keine gültige Email", + "not_allowed": "Die gewählte URL wird noch nicht unterstützt", + "timeout_connect": "Zeitüberschreitung beim Verbindungsaufbau", + "unknown": "Unerwarteter Fehler" + }, + "step": { + "german": { + "data": { + "URL": "Login-Url", + "email": "E-Mail-Adresse", + "mfa_code": "Zwei-Faktor Authentifizierung", + "password": "Passwort", + "update_interval": "Update Interval (h)" }, - "step": { - "german": { - "title": "ista EcoTrend einrichten", - "description": "Kontoauthentifizierung", - "data": { - "email": "E-Mail-Adresse", - "password": "Passwort", - "URL": "Login-Url", - "update_interval": "Update Interval (h)", - "mfa_code": "Zwei-Faktor Authentifizierung" - } - } - } + "description": "Kontoauthentifizierung", + "title": "ista EcoTrend einrichten" + } + } + }, + "options": { + "error": { + "not_allowed": "Die gewählte Url wird noch nicht unterstützt" }, - "options": { - "error": { - "not_allowed": "Die gewählte Url wird noch nicht unterstützt" + "step": { + "init": { + "data": { + "URL": "Login-Url", + "update_interval": "Update Interval (h)" }, - "step": { - "init": { - "title": "Einstellungen für ista EcoTrend", - "data": { - "URL": "Login-Url", - "update_interval": "Update Interval (h)" - } - } - } + "title": "Einstellungen für ista EcoTrend" + } } -} \ No newline at end of file + } +} diff --git a/custom_components/ecotrend_ista/translations/en.json b/custom_components/ecotrend_ista/translations/en.json index 6482690..6021dc2 100644 --- a/custom_components/ecotrend_ista/translations/en.json +++ b/custom_components/ecotrend_ista/translations/en.json @@ -1,46 +1,46 @@ { - "config": { - "abort": { - "already_configured": "Integration has already been configured", - "single_instance_allowed": "Already configured. Only a single configuration is allowed." - }, - "error": { - "cannot_connect": "Connection failed", - "auth_inval": "Login failed. Incorrect email address, password, or login URL.", - "not_allowed": "The selected URL is not yet supported", - "no_email": "Email Invalid", - "timeout_connect": "Timeout establishing connection", - "unknown": "Unexpected error" - }, - "create_entry": { - "default": "ista EcoTrend integration has been created!" + "config": { + "abort": { + "already_configured": "Integration has already been configured", + "single_instance_allowed": "Already configured. Only a single configuration is allowed." + }, + "create_entry": { + "default": "ista EcoTrend integration has been created!" + }, + "error": { + "auth_inval": "Login failed. Incorrect email address, password, or login URL.", + "cannot_connect": "Connection failed", + "no_email": "Email Invalid", + "not_allowed": "The selected URL is not yet supported", + "timeout_connect": "Timeout establishing connection", + "unknown": "Unexpected error" + }, + "step": { + "german": { + "data": { + "URL": "Login URL", + "email": "Email address", + "mfa_code": "Two-factor authentication", + "password": "Password", + "update_interval": "Update Interval (h)" }, - "step": { - "german": { - "title": "Set up ista EcoTrend", - "description": "Account authentication", - "data": { - "email": "Email address", - "password": "Password", - "URL": "Login URL", - "update_interval": "Update Interval (h)", - "mfa_code": "Two-factor authentication" - } - } - } + "description": "Account authentication", + "title": "Set up ista EcoTrend" + } + } + }, + "options": { + "error": { + "not_allowed": "The selected URL is not yet supported" }, - "options": { - "error": { - "not_allowed": "The selected URL is not yet supported" + "step": { + "init": { + "data": { + "URL": "Login URL", + "update_interval": "Update Interval (h)" }, - "step": { - "init": { - "title": "Settings for ista EcoTrend", - "data": { - "URL": "Login URL", - "update_interval": "Update Interval (h)" - } - } - } + "title": "Settings for ista EcoTrend" + } } -} \ No newline at end of file + } +} diff --git a/pyproject.toml b/pyproject.toml index 93adee5..cbaf6e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ ignore = [ "D213", # Multi-line docstring summary should start at the second line "D406", # Section name should end with a newline "D407", # Section name underlining - "D417", # + "D417", # "E501", # line too long "E731", # do not assign a lambda expression, use a def "PLC1901", # Lots of false positives @@ -117,4 +117,4 @@ max-doc-length = 127 convention = "google" [tool.pylint] -max-line-length=127 \ No newline at end of file +max-line-length=127