Update Starling Bank Integration to v2 API (#21358)

* Bump starlingbank to v2 API

* Fixed incorrect call
This commit is contained in:
Adam Dullage 2019-02-23 19:54:42 +00:00 committed by Fabian Affolter
parent e8b67fc19f
commit bfda923999
2 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@ from homeassistant.const import CONF_ACCESS_TOKEN, CONF_NAME
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
REQUIREMENTS = ['starlingbank==1.2']
REQUIREMENTS = ['starlingbank==3.0']
_LOGGER = logging.getLogger(__name__)
@ -96,8 +96,8 @@ class StarlingBalanceSensor(Entity):
def update(self):
"""Fetch new state data for the sensor."""
self._starling_account.balance.update()
self._starling_account.update_balance_data()
if self._balance_data_type == 'cleared_balance':
self._state = self._starling_account.balance.cleared_balance
self._state = self._starling_account.cleared_balance / 100
elif self._balance_data_type == 'effective_balance':
self._state = self._starling_account.balance.effective_balance
self._state = self._starling_account.effective_balance / 100

View File

@ -1616,7 +1616,7 @@ sqlalchemy==1.2.18
srpenergy==1.0.5
# homeassistant.components.sensor.starlingbank
starlingbank==1.2
starlingbank==3.0
# homeassistant.components.statsd
statsd==3.2.1