Move imports in eliqonline component (#27980)
parent
87c0207163
commit
bb381d6060
|
@ -1,15 +1,16 @@
|
||||||
"""Monitors home energy use for the ELIQ Online service."""
|
"""Monitors home energy use for the ELIQ Online service."""
|
||||||
|
import asyncio
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
import asyncio
|
|
||||||
|
|
||||||
|
import eliqonline
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_NAME, POWER_WATT
|
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_NAME, POWER_WATT
|
||||||
from homeassistant.helpers.entity import Entity
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -34,8 +35,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
|
|
||||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Set up the ELIQ Online sensor."""
|
"""Set up the ELIQ Online sensor."""
|
||||||
import eliqonline
|
|
||||||
|
|
||||||
access_token = config.get(CONF_ACCESS_TOKEN)
|
access_token = config.get(CONF_ACCESS_TOKEN)
|
||||||
name = config.get(CONF_NAME, DEFAULT_NAME)
|
name = config.get(CONF_NAME, DEFAULT_NAME)
|
||||||
channel_id = config.get(CONF_CHANNEL_ID)
|
channel_id = config.get(CONF_CHANNEL_ID)
|
||||||
|
|
Loading…
Reference in New Issue