YNAB component for Home Assistant This component will retreieve the following data from your YNAB budget
- To be budgeted amount
- Current month's budgeted amount
- Current month's remaining balance of any specified category
- Current month's budgeted amount of any specific category
- Current balance of any specified account
- Number of transactions needing approval
- Number of uncleared transactions
- Number of overspent categories
To keep api usage low, the sensor updates every 5 minutes which equates to 12 times per hour. YNAB has a rate limit (https://api.ynab.com/#rate-limiting) of 200 requests per hour and that number resets every hour on the hour.
- Open HACS > Settings
- In ADD CUSTOM REPOSITORY box paste this git's URL https://github.com/wxt9861/ynab and select type Integration
- Click INSTALL
- Make necessary modifications to your configuration.yaml
- Restart Home Assistant
- Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
- If you do not have a custom_components directory (folder) there, you need to create it.
- In the custom_components directory (folder) create a new folder called ynab.
- Download all the files from the custom_components/ynab/ directory (folder) in this repository.
- Place the files you downloaded in the new directory (folder) you created.
- Add ynab: to your HA configuration (see examples below)
- Restart Home Assistant
Key | Type | Required | Default | Description |
---|---|---|---|---|
api_key |
string |
True |
None | YNAB API key (see instructions below) |
name |
string |
False | sensor.ynab | Custom name for the sensor |
budget |
string |
False | last-used | Budget ID to use if you have multiple budgets. If none specified, your last used budget will be used |
currency |
string |
False | $ | Currency to use as unit of measurement |
categories |
list |
False | None | List of YNAB categories to include in the sensor. These are CASE SENSITIVE |
accounts |
list |
False | None | List of YNAB accounts to include in the sensor. These are CASE SENSITIVE |
ynab:
api_key: <api_key_here>
ynab:
api_key: <api_key_here>
name: "My YNAB Budget"
budget: <budget_id_here>
currency: "$"
categories:
- "HASS Budget"
- "Vacation Budget"
accounts:
- "Savings Account"
logger:
logs:
custom_components.ynab: debug
API:
- Log on to YNAB
- Go to My Budget > My Account > Developer Settings
- Click on New Token
- Enter your password and click Generate
- Copy the token that appears at the top of the page
Budget ID: The budget ID is the combination between the slashes after the URL https://app.youneedabudget.com If you only have one budget, you can omit the budget option, if you have multiple budgets pick a budget you want the sensor to report on. At this time only 1 budget is retrieved.