Move free_mobile imports at top-level (#29092)

pull/29113/head^2
Quentame 2019-11-26 19:10:05 +01:00 committed by Paulus Schoutsen
parent 274508f8fd
commit c84590b18c
1 changed files with 3 additions and 5 deletions

View File

@ -1,13 +1,13 @@
"""Support for thr Free Mobile SMS platform.""" """Support for Free Mobile SMS platform."""
import logging import logging
from freesms import FreeClient
import voluptuous as vol import voluptuous as vol
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_USERNAME from homeassistant.const import CONF_ACCESS_TOKEN, CONF_USERNAME
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
@ -25,8 +25,6 @@ class FreeSMSNotificationService(BaseNotificationService):
def __init__(self, username, access_token): def __init__(self, username, access_token):
"""Initialize the service.""" """Initialize the service."""
from freesms import FreeClient
self.free_client = FreeClient(username, access_token) self.free_client = FreeClient(username, access_token)
def send_message(self, message="", **kwargs): def send_message(self, message="", **kwargs):