Move imports to top for kwb (#29404)
This commit is contained in:
parent
2df189b58e
commit
fd107f2b2e
1 changed files with 5 additions and 6 deletions
|
@ -1,18 +1,19 @@
|
|||
"""Support for KWB Easyfire."""
|
||||
import logging
|
||||
|
||||
from pykwb import kwb
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
CONF_PORT,
|
||||
CONF_DEVICE,
|
||||
CONF_HOST,
|
||||
CONF_NAME,
|
||||
CONF_PORT,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -56,8 +57,6 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
raw = config.get(CONF_RAW)
|
||||
client_name = config.get(CONF_NAME)
|
||||
|
||||
from pykwb import kwb
|
||||
|
||||
if connection_type == "serial":
|
||||
easyfire = kwb.KWBEasyfire(MODE_SERIAL, "", 0, device)
|
||||
elif connection_type == "tcp":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue