mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 03:07:50 +00:00
move imports in tibber component (#27584)
This commit is contained in:
parent
dd8fc41747
commit
45694de2ee
@ -3,12 +3,13 @@ import asyncio
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
import tibber
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_NAME, EVENT_HOMEASSISTANT_STOP
|
||||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP, CONF_ACCESS_TOKEN, CONF_NAME
|
|
||||||
from homeassistant.helpers import discovery
|
from homeassistant.helpers import discovery
|
||||||
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.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
DOMAIN = "tibber"
|
DOMAIN = "tibber"
|
||||||
@ -25,8 +26,6 @@ async def async_setup(hass, config):
|
|||||||
"""Set up the Tibber component."""
|
"""Set up the Tibber component."""
|
||||||
conf = config.get(DOMAIN)
|
conf = config.get(DOMAIN)
|
||||||
|
|
||||||
import tibber
|
|
||||||
|
|
||||||
tibber_connection = tibber.Tibber(
|
tibber_connection = tibber.Tibber(
|
||||||
conf[CONF_ACCESS_TOKEN],
|
conf[CONF_ACCESS_TOKEN],
|
||||||
websession=async_get_clientsession(hass),
|
websession=async_get_clientsession(hass),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user