diff --git a/custom_components/personalcapital/manifest.json b/custom_components/personalcapital/manifest.json index cbfc73b..0d68e98 100644 --- a/custom_components/personalcapital/manifest.json +++ b/custom_components/personalcapital/manifest.json @@ -3,7 +3,11 @@ "name": "Personal Capital", "documentation": "https://github.com/custom-components/sensor.personalcapital/blob/master/README.md", "dependencies": [], - "codeowners": ["@iantrich"], - "requirements": ["personalcapital==1.0.1"], - "version": "0.1.2" + "codeowners": [ + "@iantrich" + ], + "requirements": [ + "git+https://github.com/sanghviharshit/personalcapital.git@master#739fb526514d2a68dc5e95f17e3c9ee49dd90f85" + ], + "version": "0.1.3" } diff --git a/custom_components/personalcapital/sensor.py b/custom_components/personalcapital/sensor.py index 0cf0bc9..2449b2a 100644 --- a/custom_components/personalcapital/sensor.py +++ b/custom_components/personalcapital/sensor.py @@ -15,9 +15,9 @@ from homeassistant.components.sensor import (PLATFORM_SCHEMA) from homeassistant.util import Throttle -__version__ = '0.1.1' +__version__ = '0.1.2' -REQUIREMENTS = ['personalcapital==1.0.1'] +# REQUIREMENTS = ['personalcapital==1.0.1'] CONF_EMAIL = 'email' CONF_PASSWORD = 'password' @@ -71,7 +71,7 @@ def personalcapital_configuration_callback(data): """Run when the configuration callback is called.""" from personalcapital import PersonalCapital, RequireTwoFactorException, TwoFactorVerificationModeEnum pc.two_factor_authenticate(TwoFactorVerificationModeEnum.SMS, data.get('verification_code')) - result = pc.authenticate_password(config.get(CONF_PASSWORD)) + result = pc.authenticate_password(config.get(CONF_EMAIL), config.get(CONF_PASSWORD)) if result == RequireTwoFactorException: configurator.notify_errors(_CONFIGURING['personalcapital'], "Invalid verification code") @@ -189,7 +189,7 @@ def icon(self): return 'mdi:coin' @property - def device_state_attributes(self): + def extra_state_attributes(self): """Return the state attributes of the sensor.""" attributes = { ATTR_ASSETS: self._assets, @@ -255,7 +255,7 @@ def icon(self): return 'mdi:coin' @property - def device_state_attributes(self): + def extra_state_attributes(self): """Return the state attributes of the sensor.""" return self.hass.data[self._productType]