mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Move imports in coinbase component (#27884)
This commit is contained in:
parent
b11dc0f50f
commit
2e416168cf
@ -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…
x
Reference in New Issue
Block a user