Moved imports to top-level in fritzbox_callmonitor component (#27705)
This commit is contained in:
parent
d4692367c5
commit
2b92fd3422
1 changed files with 5 additions and 6 deletions
|
@ -1,24 +1,25 @@
|
|||
"""Sensor to monitor incoming/outgoing phone calls on a Fritz!Box router."""
|
||||
import datetime
|
||||
import logging
|
||||
import re
|
||||
import socket
|
||||
import threading
|
||||
import datetime
|
||||
import time
|
||||
import re
|
||||
|
||||
import fritzconnection as fc # pylint: disable=import-error
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
CONF_PORT,
|
||||
CONF_NAME,
|
||||
CONF_PASSWORD,
|
||||
CONF_PORT,
|
||||
CONF_USERNAME,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -248,8 +249,6 @@ class FritzBoxPhonebook:
|
|||
self.number_dict = None
|
||||
self.prefixes = prefixes or []
|
||||
|
||||
import fritzconnection as fc # pylint: disable=import-error
|
||||
|
||||
# Establish a connection to the FRITZ!Box.
|
||||
self.fph = fc.FritzPhonebook(
|
||||
address=self.host, user=self.username, password=self.password
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue