scottg489
(Scott G.)
January 23, 2024, 4:49am
1
Excited to announce ha-simplefin , a new HA integration to track your finances with SimpleFIN ! SimpleFIN is a paid ($1.50 per month/$15.00 per year) platform offering read-only access to financial data through its API.
Developed by myself (scottg489 ) and @jeef (jeeftor ), our integration currently provides balances for connected accounts, with plans to incorporate additional details, such as investment holdings, from the SimpleFIN API .
To get started, create a SimpleFIN bridge account and connect your financial institutions through the account dashboard. Then generate a setup token by creating an “app” on the dashboard, which will be required during the ha-simplefin integration setup.
Note that we are not affiliated with SimpleFIN at all. We were simply impressed with how easy it was to connect accounts, its extensive bank compatibility, and the reasonable pricing structure.
2 Likes
jeeftor
(Jeef)
January 23, 2024, 12:59pm
2
Also there is a PR to get this into core:
home-assistant:dev
← jeeftor:simplefin
opened 01:13AM - 19 Jan 24 UTC
## Proposed change
<!--
Describe the big picture of your changes here to com… municate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
I've been working with @ScottG489 on building out this integration. [SimpleFIN](https://www.simplefin.org) is a paid service ($1.50USD/Month) that allows users to create a READ ONLY endpoint that will pull down financial data from a variety of services and see their account balances.
<img width="717" alt="image" src="https://github.com/home-assistant/core/assets/6491743/3e3a7e1a-cb6f-444e-bc91-7b316c26faaa">
### Backing Library
This integration uses the backing library: [simplefin4py](https://github.com/jeeftor/simplefin4py) which is based on the [SimpleFin protocol](https://www.simplefin.org/protocol.html)
### Config Flow
SimpleFIN operates via assigning users a **CLAIM TOKEN** which is a Base64 encode URL to which the user will make a single post to. Once they've done that SimpleFIN will deliver them a set of credentials and a URL to use to obtain financial data. The **CLAIM TOKEN** can only be used once, but the URL may be used many times.
In order to offer users the most simple user experience - the config flow will accept either a Claim Token or an access URL.
- If an access URL is given we will test it to ensure it "works" and then move on.
- If a claim token is given - we will exchange it for an access url, test the access URL and move on.
This should stream line the process so that if users already have an access URL they will not be required to generate a new claim token/URL just to use with HA
### Icon inference
The backing library will set a state of inferred_account_type based on a variety of different factors using the following logic.
```python
if "savings" in account_name_lower:
return AccountType.SAVINGS
if "mortgate" in account_name_lower:
return AccountType.MORTGAGE
if "checking" in account_name_lower:
return AccountType.CHECKING
if (
"visa" in account_name_lower
or "mastercard" in account_name_lower
or "credit" in account_name_lower
or "card" in account_name_lower
):
return AccountType.CREDIT_CARD
if self.holdings:
return AccountType.INVESTMENT
return AccountType.UNKNOWN
```
The integration then has a utility method to provide various mdi "default" icons for the different account types
### Future Plans
- Parsing of Transactions / Holdings
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/30933
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [x] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [x] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [x] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [x] Untested files have been added to `.coveragerc`.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [x] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr