Move imports in ohmconnect component (#28041)

This commit is contained in:
Diefferson Koderer Môro authored and Fabian Affolter committed 2019-10-21 10:03:24 +02:00
1 parent 2f96691938
commit 56a7233e0f
1 file changed
+3 -4
@@ -1,15 +1,16 @@
"""Support for OhmConnect."""
import logging
from datetime import timedelta
import logging
import defusedxml.ElementTree as ET
import requests
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from homeassistant.util import Throttle
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
_LOGGER = logging.getLogger(__name__)
@@ -64,8 +65,6 @@ class OhmconnectSensor(Entity):
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
"""Get the latest data from OhmConnect."""
import defusedxml.ElementTree as ET
try:
url = ("https://login.ohmconnect.com" "/verify-ohm-hour/{}").format(
self._ohmid