Move imports to top for lametric (#29406)

pull/29390/merge
springstan 2019-12-04 10:49:33 +01:00 committed by Fabian Affolter
parent f6780c1fa2
commit 09e2be02d3
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,7 @@
"""Support for LaMetric time."""
import logging
from lmnotify import LaMetricManager
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
@ -50,7 +51,6 @@ class HassLaMetricManager:
def __init__(self, client_id, client_secret):
"""Initialize HassLaMetricManager and connect to LaMetric."""
from lmnotify import LaMetricManager
_LOGGER.debug("Connecting to LaMetric")
self.manager = LaMetricManager(client_id, client_secret)

View File

@ -1,6 +1,8 @@
"""Support for LaMetric notifications."""
import logging
from lmnotify import Model, SimpleFrame, Sound
from oauthlib.oauth2 import TokenExpiredError
from requests.exceptions import ConnectionError as RequestsConnectionError
import voluptuous as vol
@ -59,8 +61,6 @@ class LaMetricNotificationService(BaseNotificationService):
def send_message(self, message="", **kwargs):
"""Send a message to some LaMetric device."""
from lmnotify import SimpleFrame, Sound, Model
from oauthlib.oauth2 import TokenExpiredError
targets = kwargs.get(ATTR_TARGET)
data = kwargs.get(ATTR_DATA)