mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Update Starling Bank Integration to v2 API (#21358)
* Bump starlingbank to v2 API * Fixed incorrect call
This commit is contained in:
parent
e8b67fc19f
commit
bfda923999
@ -14,7 +14,7 @@ from homeassistant.const import CONF_ACCESS_TOKEN, CONF_NAME
|
|||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
REQUIREMENTS = ['starlingbank==1.2']
|
REQUIREMENTS = ['starlingbank==3.0']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -96,8 +96,8 @@ class StarlingBalanceSensor(Entity):
|
|||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Fetch new state data for the sensor."""
|
"""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':
|
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':
|
elif self._balance_data_type == 'effective_balance':
|
||||||
self._state = self._starling_account.balance.effective_balance
|
self._state = self._starling_account.effective_balance / 100
|
||||||
|
@ -1616,7 +1616,7 @@ sqlalchemy==1.2.18
|
|||||||
srpenergy==1.0.5
|
srpenergy==1.0.5
|
||||||
|
|
||||||
# homeassistant.components.sensor.starlingbank
|
# homeassistant.components.sensor.starlingbank
|
||||||
starlingbank==1.2
|
starlingbank==3.0
|
||||||
|
|
||||||
# homeassistant.components.statsd
|
# homeassistant.components.statsd
|
||||||
statsd==3.2.1
|
statsd==3.2.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user