Add support to fints for configuring unsupported account_types (#83537)
* Possibility to configure unsupported account_types Changed conditions to be able to configure unsupported account_types like: Loan, Creditcards, Call money, etcpp. Those accounts won't be added automatically. But with this fix you can add them manually via configuration if needed. * chore: add integration_type for fints fix: lint error chore: add more info to warning for debugging purpose * Possibility to configure unsupported account_types Changed conditions to be able to configure unsupported account_types like: Loan, Creditcards, Call money, etcpp. Those accounts won't be added automatically. But with this fix you can add them manually via configuration if needed. * chore: broken merge * fix: remove version from manifest.json --------- Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
parent
7ef47da27d
commit
067ece97b8
3 changed files with 21 additions and 18 deletions
|
@ -3,6 +3,7 @@
|
|||
"name": "FinTS",
|
||||
"codeowners": [],
|
||||
"documentation": "https://www.home-assistant.io/integrations/fints",
|
||||
"integration_type": "service",
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["fints", "mt_940", "sepaxml"],
|
||||
"requirements": ["fints==3.1.0"]
|
||||
|
|
|
@ -168,14 +168,13 @@ class FinTsClient:
|
|||
if not account_information:
|
||||
return False
|
||||
|
||||
if not account_information["type"]:
|
||||
# bank does not support account types, use value from config
|
||||
if (
|
||||
account_information["iban"] in self.account_config
|
||||
or account_information["account_number"] in self.account_config
|
||||
):
|
||||
return True
|
||||
elif 1 <= account_information["type"] <= 9:
|
||||
if 1 <= account_information["type"] <= 9:
|
||||
return True
|
||||
|
||||
if (
|
||||
account_information["iban"] in self.account_config
|
||||
or account_information["account_number"] in self.account_config
|
||||
):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
@ -189,14 +188,13 @@ class FinTsClient:
|
|||
if not account_information:
|
||||
return False
|
||||
|
||||
if not account_information["type"]:
|
||||
# bank does not support account types, use value from config
|
||||
if (
|
||||
account_information["iban"] in self.holdings_config
|
||||
or account_information["account_number"] in self.holdings_config
|
||||
):
|
||||
return True
|
||||
elif 30 <= account_information["type"] <= 39:
|
||||
if 30 <= account_information["type"] <= 39:
|
||||
return True
|
||||
|
||||
if (
|
||||
account_information["iban"] in self.holdings_config
|
||||
or account_information["account_number"] in self.holdings_config
|
||||
):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
@ -215,7 +213,11 @@ class FinTsClient:
|
|||
holdings_accounts.append(account)
|
||||
|
||||
else:
|
||||
_LOGGER.warning("Could not determine type of account %s", account.iban)
|
||||
_LOGGER.warning(
|
||||
"Could not determine type of account %s from %s",
|
||||
account.iban,
|
||||
self.client.user_id,
|
||||
)
|
||||
|
||||
return balance_accounts, holdings_accounts
|
||||
|
||||
|
|
|
@ -1718,7 +1718,7 @@
|
|||
},
|
||||
"fints": {
|
||||
"name": "FinTS",
|
||||
"integration_type": "hub",
|
||||
"integration_type": "service",
|
||||
"config_flow": false,
|
||||
"iot_class": "cloud_polling"
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue