mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Move imports in ohmconnect component (#28041)
This commit is contained in:
parent
2f96691938
commit
56a7233e0f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user