mirror of
https://github.com/home-assistant/core
synced 2024-09-03 08:14:07 +02:00
Move imports in otp component (#28044)
This commit is contained in:
parent
bbc71441a1
commit
2f96691938
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user