Move imports in openevse component (#28043)

This commit is contained in:
Diefferson Koderer Môro 2019-10-21 04:55:29 -03:00 committed by Fabian Affolter
parent 265a1f1fb6
commit 1342fe2b3c

View File

@ -1,17 +1,18 @@
"""Support for monitoring an OpenEVSE Charger."""
import logging
import openevsewifi
from requests import RequestException
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
TEMP_CELSIUS,
CONF_HOST,
ENERGY_KILO_WATT_HOUR,
CONF_MONITORED_VARIABLES,
ENERGY_KILO_WATT_HOUR,
TEMP_CELSIUS,
)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
@ -38,8 +39,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the OpenEVSE sensor."""
import openevsewifi
host = config.get(CONF_HOST)
monitored_variables = config.get(CONF_MONITORED_VARIABLES)