Move imports to top for zabbix (#29195)

pull/29208/head
springstan 2019-11-29 02:07:52 +01:00 committed by Martin Hjelmare
parent 66aae61fd5
commit fe34ea1865
2 changed files with 4 additions and 4 deletions

View File

@ -2,13 +2,14 @@
import logging
from urllib.parse import urljoin
from pyzabbix import ZabbixAPI, ZabbixAPIException
import voluptuous as vol
from homeassistant.const import (
CONF_PATH,
CONF_HOST,
CONF_SSL,
CONF_PASSWORD,
CONF_PATH,
CONF_SSL,
CONF_USERNAME,
)
import homeassistant.helpers.config_validation as cv
@ -37,7 +38,6 @@ CONFIG_SCHEMA = vol.Schema(
def setup(hass, config):
"""Set up the Zabbix component."""
from pyzabbix import ZabbixAPI, ZabbixAPIException
conf = config[DOMAIN]
if conf[CONF_SSL]:

View File

@ -4,9 +4,9 @@ import logging
import voluptuous as vol
from homeassistant.components import zabbix
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)