diff --git a/homeassistant/components/kwb/sensor.py b/homeassistant/components/kwb/sensor.py index 49815faf7ae..b7872ca1ab4 100644 --- a/homeassistant/components/kwb/sensor.py +++ b/homeassistant/components/kwb/sensor.py @@ -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":