mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
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,6 +3,7 @@
|
|||||||
"name": "FinTS",
|
"name": "FinTS",
|
||||||
"codeowners": [],
|
"codeowners": [],
|
||||||
"documentation": "https://www.home-assistant.io/integrations/fints",
|
"documentation": "https://www.home-assistant.io/integrations/fints",
|
||||||
|
"integration_type": "service",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["fints", "mt_940", "sepaxml"],
|
"loggers": ["fints", "mt_940", "sepaxml"],
|
||||||
"requirements": ["fints==3.1.0"]
|
"requirements": ["fints==3.1.0"]
|
||||||
|
@ -168,14 +168,13 @@ class FinTsClient:
|
|||||||
if not account_information:
|
if not account_information:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not account_information["type"]:
|
if 1 <= account_information["type"] <= 9:
|
||||||
# bank does not support account types, use value from config
|
return True
|
||||||
if (
|
|
||||||
account_information["iban"] in self.account_config
|
if (
|
||||||
or account_information["account_number"] in self.account_config
|
account_information["iban"] in self.account_config
|
||||||
):
|
or account_information["account_number"] in self.account_config
|
||||||
return True
|
):
|
||||||
elif 1 <= account_information["type"] <= 9:
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
@ -189,14 +188,13 @@ class FinTsClient:
|
|||||||
if not account_information:
|
if not account_information:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not account_information["type"]:
|
if 30 <= account_information["type"] <= 39:
|
||||||
# bank does not support account types, use value from config
|
return True
|
||||||
if (
|
|
||||||
account_information["iban"] in self.holdings_config
|
if (
|
||||||
or account_information["account_number"] in self.holdings_config
|
account_information["iban"] in self.holdings_config
|
||||||
):
|
or account_information["account_number"] in self.holdings_config
|
||||||
return True
|
):
|
||||||
elif 30 <= account_information["type"] <= 39:
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
@ -215,7 +213,11 @@ class FinTsClient:
|
|||||||
holdings_accounts.append(account)
|
holdings_accounts.append(account)
|
||||||
|
|
||||||
else:
|
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
|
return balance_accounts, holdings_accounts
|
||||||
|
|
||||||
|
@ -1718,7 +1718,7 @@
|
|||||||
},
|
},
|
||||||
"fints": {
|
"fints": {
|
||||||
"name": "FinTS",
|
"name": "FinTS",
|
||||||
"integration_type": "hub",
|
"integration_type": "service",
|
||||||
"config_flow": false,
|
"config_flow": false,
|
||||||
"iot_class": "cloud_polling"
|
"iot_class": "cloud_polling"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user