Fix coinbase response pagination (#50890)
* Fix issue #50500 * next is a python keyword
This commit is contained in:
parent
b9086b5e39
commit
99e58f3c18
2 changed files with 17 additions and 3 deletions
|
@ -81,7 +81,7 @@ class AccountSensor(SensorEntity):
|
|||
def update(self):
|
||||
"""Get the latest state of the sensor."""
|
||||
self._coinbase_data.update()
|
||||
for account in self._coinbase_data.accounts["data"]:
|
||||
for account in self._coinbase_data.accounts:
|
||||
if self._name == f"Coinbase {account['name']}":
|
||||
self._state = account["balance"]["amount"]
|
||||
self._native_balance = account["native_balance"]["amount"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue