Move imports to top for maxcube (#29393)

This commit is contained in:
springstan 2019-12-04 11:15:53 +01:00 committed by Fabian Affolter
parent d79d9e0bfb
commit 849d8c885d
2 changed files with 6 additions and 6 deletions

View File

@ -1,14 +1,16 @@
"""Support for the MAX! Cube LAN Gateway."""
import logging
import time
from socket import timeout
from threading import Lock
import time
from maxcube.connection import MaxCubeConnection
from maxcube.cube import MaxCube
import voluptuous as vol
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SCAN_INTERVAL
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.discovery import load_platform
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SCAN_INTERVAL
_LOGGER = logging.getLogger(__name__)
@ -46,8 +48,6 @@ CONFIG_SCHEMA = vol.Schema(
def setup(hass, config):
"""Establish connection to MAX! Cube."""
from maxcube.connection import MaxCubeConnection
from maxcube.cube import MaxCube
if DATA_KEY not in hass.data:
hass.data[DATA_KEY] = {}

View File

@ -4,16 +4,16 @@ import socket
from maxcube.device import (
MAX_DEVICE_MODE_AUTOMATIC,
MAX_DEVICE_MODE_BOOST,
MAX_DEVICE_MODE_MANUAL,
MAX_DEVICE_MODE_VACATION,
MAX_DEVICE_MODE_BOOST,
)
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
HVAC_MODE_AUTO,
SUPPORT_TARGET_TEMPERATURE,
SUPPORT_PRESET_MODE,
SUPPORT_TARGET_TEMPERATURE,
)
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS