Move imports to top for fastdotcom (#29428)
parent
12791a687b
commit
4b6a2496c7
|
@ -1,11 +1,12 @@
|
||||||
"""Support for testing internet speed via Fast.com."""
|
"""Support for testing internet speed via Fast.com."""
|
||||||
import logging
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from fastdotcom import fast_com
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.const import CONF_SCAN_INTERVAL
|
from homeassistant.const import CONF_SCAN_INTERVAL
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.discovery import async_load_platform
|
from homeassistant.helpers.discovery import async_load_platform
|
||||||
from homeassistant.helpers.dispatcher import dispatcher_send
|
from homeassistant.helpers.dispatcher import dispatcher_send
|
||||||
from homeassistant.helpers.event import async_track_time_interval
|
from homeassistant.helpers.event import async_track_time_interval
|
||||||
|
@ -63,7 +64,6 @@ class SpeedtestData:
|
||||||
|
|
||||||
def update(self, now=None):
|
def update(self, now=None):
|
||||||
"""Get the latest data from fast.com."""
|
"""Get the latest data from fast.com."""
|
||||||
from fastdotcom import fast_com
|
|
||||||
|
|
||||||
_LOGGER.debug("Executing fast.com speedtest")
|
_LOGGER.debug("Executing fast.com speedtest")
|
||||||
self.data = {"download": fast_com()}
|
self.data = {"download": fast_com()}
|
||||||
|
|
Loading…
Reference in New Issue