Home Assistant Open Source

Multiple Currency Support for Mint.com

As I am integrating more and more services I use on the daily basis with Home Assistant, I was a little disappointed that there is no existing integration for my favorite personal finance application. Upon some research, I found out this was something considered for Home Assistant core components but later removed because it had some issues and was not being maintained. So I thought it was a perfect excuse to get my hands dirty. I had some base code from the original component, so I started fixing the issues to get it in a working condition. However, I realized this will probably never make it to the official Home Assistant core components because the mint client dependency currently doesn’t work headless and the Home Assistant core component require the integrations to work in headless mode. So I decided to publish and maintain it as a custom component on my Github profile.

Multiple Currency Support

In addition to scraping the accounts in various categories, I had a couple extra requirements because I wanted to track my finances in 3 different currencies as I held accounts in 3 different countries. While mint.com allows adding accounts from all three countries, it assumes all the accounts are in USD. I wanted to have a view of all of my accounts after converting the account balances from non-USD currency to USD with current exchange rates. I used a Python package called CurrencyConverter to convert all non-USD balances to USD.

Installation

See the instructions on Github project

Configuration

sensor:
  - platform: mint_finance
    username: !secret mint_username
    password: !secret mint_password
    monitored_categories:
      - investment
      - bank
      - 'other property'
      - credit
    unit_of_measurement: USD
    account_currency_override:
      CAD: !secret mint_cad_account_list
      INR: !secret mint_cad_account_list

Configuration variables

  • username: Your mint account username
  • password: Your mint account password
  • monitored_categories (Optional): List of categories you’d like to monitor. Available options are investment, bank, other property, credit, mortgage, loan, real estate, vehicle and unclassified.
  • unit_of_measurement (Optional): Default is USD.
  • account_currency_override (Optional): Mint only supports one currency, so your accounts from multiple different currencies will report numeric value in same currency as is instead of performing any currency conversions. With this option, you can provide list of accounts you’d like to covert into default unit_of_measurement
  • exclude_accounts (Optional): List of accounts you’d like to exclude. We exclude accounts which are not active always. This option allows excluding any additional accounts you don’t want to see in home assistant.

Github Links

Check out my other posts on Home Assistant if you are interested in learning more about my setup.

Leave a Reply