diff --git a/README.md b/README.md index 653c5fe..e119654 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Version](https://img.shields.io/badge/version-0.0.9-green.svg?style=for-the-badge)](#) [![mantained](https://img.shields.io/maintenance/yes/2019.svg?style=for-the-badge)](#) +[![Version](https://img.shields.io/badge/version-0.1.0-green.svg?style=for-the-badge)](#) [![mantained](https://img.shields.io/maintenance/yes/2019.svg?style=for-the-badge)](#) [![maintainer](https://img.shields.io/badge/maintainer-Ian%20Richardson%20%40iantrich-blue.svg?style=for-the-badge)](#) @@ -11,7 +11,7 @@ Hey dude! Help me out for a couple of :beers: or a :coffee:! Personal Capital component for [Home Assistant](https://www.home-assistant.io/) To get started put `/custom_components/sensor/personalcapital.py` here: -`/custom_components/sensor/personalcapital.py`. You can use this component with the custom [Personal Capital Lovelace card](https://github.com/custom-cards/pc-card). +`/custom_components/sensor/personalcapital.py`. You can use this component with the custom [Personal Capital Lovelace card](https://github.com/custom-cards/pc-card). **Example configuration.yaml:** @@ -22,8 +22,8 @@ sensor: password: 12345 unit_of_measurement: CAD monitored_categories: - - assets - investments + - cash ``` **Configuration variables:** @@ -34,7 +34,7 @@ key | description **email (Required)** | Email for personalcapital.com **password (Required)** | Password for personalcapital.com **unit_of_measurement (Optional)** | Unit of measurement for your accounts **Default** USD -**monitored_categories (Optional)** | Banking categories to monitor. By default all categories are monitored. Options are `investments, mortgages, cash, other_assets, other_liabilities, credit_cards, loans` +**monitored_categories (Optional)** | Banking categories to monitor. By default all categories are monitored. Options are `investment, mortgage, cash, other_asset, other_liability, credit, loan` *** **Note: You'll get a text message with your pin code to use on the frontend to configure** diff --git a/custom_components/sensor/personalcapital.py b/custom_components/sensor/personalcapital.py index 3bab82b..d8d54cb 100644 --- a/custom_components/sensor/personalcapital.py +++ b/custom_components/sensor/personalcapital.py @@ -15,7 +15,7 @@ from homeassistant.components.sensor import (PLATFORM_SCHEMA) from homeassistant.util import Throttle -__version__ = '0.0.9' +__version__ = '0.1.0' REQUIREMENTS = ['personalcapital==1.0.1'] @@ -30,25 +30,25 @@ ATTR_NETWORTH = 'networth' ATTR_ASSETS = 'assets' ATTR_LIABILITIES = 'liabilities' -ATTR_INVESTMENTS = 'investments' -ATTR_MORTGAGES = 'mortgages' +ATTR_INVESTMENT = 'investment' +ATTR_MORTGAGE = 'mortgage' ATTR_CASH = 'cash' -ATTR_OTHER_ASSETS = 'other_assets' -ATTR_OTHER_LIABILITIES = 'other_liabilities' -ATTR_CREDIT = 'credit_cards' -ATTR_LOANS = 'loans' +ATTR_OTHER_ASSET = 'other_asset' +ATTR_OTHER_LIABILITY = 'other_liability' +ATTR_CREDIT = 'credit' +ATTR_LOAN = 'loan' SCAN_INTERVAL = timedelta(minutes=30) MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=5) SENSOR_TYPES = { - ATTR_INVESTMENTS: ['INVESTMENT', '', 'investmentAccountsTotal', 'Investment', False], - ATTR_MORTGAGES: ['MORTGAGE', '', 'mortgageAccountsTotal', 'Mortgage', True], + ATTR_INVESTMENT: ['INVESTMENT', '', 'investmentAccountsTotal', 'Investment', False], + ATTR_MORTGAGE: ['MORTGAGE', '', 'mortgageAccountsTotal', 'Mortgage', True], ATTR_CASH: ['BANK', 'Cash', 'cashAccountsTotal', 'Cash', False], - ATTR_OTHER_ASSETS: ['OTHER_ASSETS', '', 'otherAssetAccountsTotal', 'Other Asset', False], - ATTR_OTHER_LIABILITIES: ['OTHER_LIABILITIES', '', 'otherLiabilitiesAccountsTotal', 'Other Liability', True], + ATTR_OTHER_ASSET: ['OTHER_ASSETS', '', 'otherAssetAccountsTotal', 'Other Asset', False], + ATTR_OTHER_LIABILITY: ['OTHER_LIABILITIES', '', 'otherLiabilitiesAccountsTotal', 'Other Liability', True], ATTR_CREDIT: ['CREDIT_CARD', '', 'creditCardAccountsTotal', 'Credit', True], - ATTR_LOANS: ['LOAN', '', 'loanAccountsTotal', 'Loan', True], + ATTR_LOAN: ['LOAN', '', 'loanAccountsTotal', 'Loan', True], } PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({