Move dyson imports at top-level (#29047)

This commit is contained in:
Quentame authored and Pascal Vizeli committed 2019-11-25 14:06:39 +01:00
1 parent 193769c791
commit 752a4d7221
6 files changed
+28 -64

No files matched your search

+2 -3
View File
@@ -1,11 +1,12 @@
"""Support for Dyson Pure Cool Link devices."""
import logging
from libpurecool.dyson import DysonAccount
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.const import CONF_DEVICES, CONF_PASSWORD, CONF_TIMEOUT, CONF_USERNAME
from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
@@ -43,8 +44,6 @@ def setup(hass, config):
if DYSON_DEVICES not in hass.data:
hass.data[DYSON_DEVICES] = []
from libpurecool.dyson import DysonAccount
dyson_account = DysonAccount(
config[DOMAIN].get(CONF_USERNAME),
config[DOMAIN].get(CONF_PASSWORD),