Move imports to top for swiss_hydrological_data (#29227)
parent
39bf1b5f5d
commit
fbfbae8ad9
|
@ -2,6 +2,7 @@
|
|||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from swisshydrodata import SwissHydroData
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
|
@ -167,7 +168,6 @@ class HydrologicalData:
|
|||
@Throttle(MIN_TIME_BETWEEN_UPDATES)
|
||||
def update(self):
|
||||
"""Get the latest data."""
|
||||
from swisshydrodata import SwissHydroData
|
||||
|
||||
shd = SwissHydroData()
|
||||
self.data = shd.get_station(self.station)
|
||||
|
|
Loading…
Reference in New Issue