Move imports in kira component (#28007)

This commit is contained in:
Diefferson Koderer Môro 2019-10-21 05:24:06 -03:00 committed by Fabian Affolter
parent 36ff790a39
commit 322399c0af

View File

@ -2,11 +2,13 @@
import logging import logging
import os import os
import pykira
import voluptuous as vol import voluptuous as vol
from voluptuous.error import Error as VoluptuousError from voluptuous.error import Error as VoluptuousError
import yaml import yaml
from homeassistant.const import ( from homeassistant.const import (
CONF_CODE,
CONF_DEVICE, CONF_DEVICE,
CONF_HOST, CONF_HOST,
CONF_NAME, CONF_NAME,
@ -15,7 +17,6 @@ from homeassistant.const import (
CONF_TYPE, CONF_TYPE,
EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_STOP,
STATE_UNKNOWN, STATE_UNKNOWN,
CONF_CODE,
) )
from homeassistant.helpers import discovery from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
@ -93,8 +94,6 @@ def load_codes(path):
def setup(hass, config): def setup(hass, config):
"""Set up the KIRA component.""" """Set up the KIRA component."""
import pykira
sensors = config.get(DOMAIN, {}).get(CONF_SENSORS, []) sensors = config.get(DOMAIN, {}).get(CONF_SENSORS, [])
remotes = config.get(DOMAIN, {}).get(CONF_REMOTES, []) remotes = config.get(DOMAIN, {}).get(CONF_REMOTES, [])
# If no sensors or remotes were specified, add a sensor # If no sensors or remotes were specified, add a sensor