From be4e55fcc5ee73764da5c90cdfb28c114aead180 Mon Sep 17 00:00:00 2001 From: Harshit Sanghvi Date: Tue, 11 Jan 2022 19:40:04 -0800 Subject: [PATCH 1/4] use new version --- custom_components/personalcapital/manifest.json | 4 ++-- custom_components/personalcapital/sensor.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/personalcapital/manifest.json b/custom_components/personalcapital/manifest.json index cbfc73b..aee9aee 100644 --- a/custom_components/personalcapital/manifest.json +++ b/custom_components/personalcapital/manifest.json @@ -4,6 +4,6 @@ "documentation": "https://github.com/custom-components/sensor.personalcapital/blob/master/README.md", "dependencies": [], "codeowners": ["@iantrich"], - "requirements": ["personalcapital==1.0.1"], - "version": "0.1.2" + "requirements": ["git+https://github.com/sanghviharshit/personalcapital.git@master#sanghviharshit"], + "version": "0.1.3" } diff --git a/custom_components/personalcapital/sensor.py b/custom_components/personalcapital/sensor.py index 0cf0bc9..8fb8430 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") From bcf95551f0f5df56f0b4072e5056248c9adb2e8b Mon Sep 17 00:00:00 2001 From: Harshit Sanghvi Date: Wed, 3 Aug 2022 16:37:20 -0700 Subject: [PATCH 2/4] fix missing attributes for sensors --- custom_components/personalcapital/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/personalcapital/sensor.py b/custom_components/personalcapital/sensor.py index 8fb8430..2449b2a 100644 --- a/custom_components/personalcapital/sensor.py +++ b/custom_components/personalcapital/sensor.py @@ -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] From 67211acb853fbf4c47a0e99cab230d9d48921352 Mon Sep 17 00:00:00 2001 From: Harshit Sanghvi Date: Thu, 13 Apr 2023 22:12:04 -0700 Subject: [PATCH 3/4] add requirements --- custom_components/personalcapital/manifest.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/custom_components/personalcapital/manifest.json b/custom_components/personalcapital/manifest.json index aee9aee..31fe3d5 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": ["git+https://github.com/sanghviharshit/personalcapital.git@master#sanghviharshit"], + "codeowners": [ + "@iantrich" + ], + "requirements": [ + "git+https://github.com/sanghviharshit/personalcapital.git@master#293cf88cdaa53d0511c8da928038529459cfa8ea" + ], "version": "0.1.3" } From 665c75eddd8b2a4e406d43e127ad772c861d2e06 Mon Sep 17 00:00:00 2001 From: Harshit Sanghvi Date: Thu, 13 Apr 2023 22:56:40 -0700 Subject: [PATCH 4/4] update requirements --- custom_components/personalcapital/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/personalcapital/manifest.json b/custom_components/personalcapital/manifest.json index 31fe3d5..0d68e98 100644 --- a/custom_components/personalcapital/manifest.json +++ b/custom_components/personalcapital/manifest.json @@ -7,7 +7,7 @@ "@iantrich" ], "requirements": [ - "git+https://github.com/sanghviharshit/personalcapital.git@master#293cf88cdaa53d0511c8da928038529459cfa8ea" + "git+https://github.com/sanghviharshit/personalcapital.git@master#739fb526514d2a68dc5e95f17e3c9ee49dd90f85" ], "version": "0.1.3" }