mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Move imports to top for etherscan (#29426)
This commit is contained in:
parent
af18c668d2
commit
0d1a389602
@ -1,6 +1,7 @@
|
|||||||
"""Support for Etherscan sensors."""
|
"""Support for Etherscan sensors."""
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
|
from pyetherscan import get_balance
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
@ -75,7 +76,6 @@ class EtherscanSensor(Entity):
|
|||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Get the latest state of the sensor."""
|
"""Get the latest state of the sensor."""
|
||||||
from pyetherscan import get_balance
|
|
||||||
|
|
||||||
if self._token_address:
|
if self._token_address:
|
||||||
self._state = get_balance(self._address, self._token_address)
|
self._state = get_balance(self._address, self._token_address)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user