Move imports in otp component (#28044)

This commit is contained in:
Diefferson Koderer Môro authored and Fabian Affolter committed 2019-10-21 10:02:59 +02:00
1 parent bbc71441a1
commit 2f96691938
1 file changed
+4 -5
+4 -5
View File
@@ -1,13 +1,14 @@
"""Support for One-Time Password (OTP)."""
import time
import logging
import time
import pyotp
import voluptuous as vol
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME, CONF_TOKEN
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
@@ -41,8 +42,6 @@ class TOTPSensor(Entity):
def __init__(self, name, token):
"""Initialize the sensor."""
import pyotp
self._name = name
self._otp = pyotp.TOTP(token)
self._state = None