mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Move imports to top for nut (#29368)
This commit is contained in:
parent
f220c73e8f
commit
655780447c
@ -1,25 +1,26 @@
|
||||
"""Provides a sensor to track various status aspects of a UPS."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from pynut2.nut2 import PyNUTClient, PyNUTError
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
CONF_PORT,
|
||||
CONF_NAME,
|
||||
CONF_USERNAME,
|
||||
CONF_PASSWORD,
|
||||
TEMP_CELSIUS,
|
||||
CONF_RESOURCES,
|
||||
CONF_ALIAS,
|
||||
ATTR_STATE,
|
||||
STATE_UNKNOWN,
|
||||
CONF_ALIAS,
|
||||
CONF_HOST,
|
||||
CONF_NAME,
|
||||
CONF_PASSWORD,
|
||||
CONF_PORT,
|
||||
CONF_RESOURCES,
|
||||
CONF_USERNAME,
|
||||
POWER_WATT,
|
||||
STATE_UNKNOWN,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
@ -270,7 +271,6 @@ class PyNUTData:
|
||||
|
||||
def __init__(self, host, port, alias, username, password):
|
||||
"""Initialize the data object."""
|
||||
from pynut2.nut2 import PyNUTClient, PyNUTError
|
||||
|
||||
self._host = host
|
||||
self._port = port
|
||||
|
Loading…
x
Reference in New Issue
Block a user