Move imports in coinbase component (#27884)
This commit is contained in:
parent
b11dc0f50f
commit
2e416168cf
1 changed files with 2 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
|||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from coinbase.wallet.client import Client
|
||||
from coinbase.wallet.error import AuthenticationError
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import CONF_API_KEY
|
||||
|
@ -79,7 +81,6 @@ class CoinbaseData:
|
|||
|
||||
def __init__(self, api_key, api_secret):
|
||||
"""Init the coinbase data object."""
|
||||
from coinbase.wallet.client import Client
|
||||
|
||||
self.client = Client(api_key, api_secret)
|
||||
self.update()
|
||||
|
@ -87,7 +88,6 @@ class CoinbaseData:
|
|||
@Throttle(MIN_TIME_BETWEEN_UPDATES)
|
||||
def update(self):
|
||||
"""Get the latest data from coinbase."""
|
||||
from coinbase.wallet.error import AuthenticationError
|
||||
|
||||
try:
|
||||
self.accounts = self.client.get_accounts()
|
||||
|
|
Loading…
Add table
Reference in a new issue