Move imports to top for swiss_hydrological_data (#29227)

pull/29236/head
springstan 2019-11-29 21:50:09 +01:00 committed by Franck Nijhof
parent 39bf1b5f5d
commit fbfbae8ad9
1 changed files with 1 additions and 1 deletions

View File

@ -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)