mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Move imports to top for maxcube (#29393)
This commit is contained in:
parent
d79d9e0bfb
commit
849d8c885d
@ -1,14 +1,16 @@
|
|||||||
"""Support for the MAX! Cube LAN Gateway."""
|
"""Support for the MAX! Cube LAN Gateway."""
|
||||||
import logging
|
import logging
|
||||||
import time
|
|
||||||
from socket import timeout
|
from socket import timeout
|
||||||
from threading import Lock
|
from threading import Lock
|
||||||
|
import time
|
||||||
|
|
||||||
|
from maxcube.connection import MaxCubeConnection
|
||||||
|
from maxcube.cube import MaxCube
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
|
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SCAN_INTERVAL
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.discovery import load_platform
|
from homeassistant.helpers.discovery import load_platform
|
||||||
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SCAN_INTERVAL
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -46,8 +48,6 @@ CONFIG_SCHEMA = vol.Schema(
|
|||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""Establish connection to MAX! Cube."""
|
"""Establish connection to MAX! Cube."""
|
||||||
from maxcube.connection import MaxCubeConnection
|
|
||||||
from maxcube.cube import MaxCube
|
|
||||||
|
|
||||||
if DATA_KEY not in hass.data:
|
if DATA_KEY not in hass.data:
|
||||||
hass.data[DATA_KEY] = {}
|
hass.data[DATA_KEY] = {}
|
||||||
|
@ -4,16 +4,16 @@ import socket
|
|||||||
|
|
||||||
from maxcube.device import (
|
from maxcube.device import (
|
||||||
MAX_DEVICE_MODE_AUTOMATIC,
|
MAX_DEVICE_MODE_AUTOMATIC,
|
||||||
|
MAX_DEVICE_MODE_BOOST,
|
||||||
MAX_DEVICE_MODE_MANUAL,
|
MAX_DEVICE_MODE_MANUAL,
|
||||||
MAX_DEVICE_MODE_VACATION,
|
MAX_DEVICE_MODE_VACATION,
|
||||||
MAX_DEVICE_MODE_BOOST,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from homeassistant.components.climate import ClimateDevice
|
from homeassistant.components.climate import ClimateDevice
|
||||||
from homeassistant.components.climate.const import (
|
from homeassistant.components.climate.const import (
|
||||||
HVAC_MODE_AUTO,
|
HVAC_MODE_AUTO,
|
||||||
SUPPORT_TARGET_TEMPERATURE,
|
|
||||||
SUPPORT_PRESET_MODE,
|
SUPPORT_PRESET_MODE,
|
||||||
|
SUPPORT_TARGET_TEMPERATURE,
|
||||||
)
|
)
|
||||||
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
|
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user