mirror of
https://github.com/home-assistant/core.git
synced 2025-08-27 00:11:33 +02:00
Move imports to top for swiss_hydrological_data (#29227)
This commit is contained in:
committed by
Franck Nijhof
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)
|
||||
|
Reference in New Issue
Block a user