From 849d8c885deaefb3792e75741b8e46e0298beae8 Mon Sep 17 00:00:00 2001 From: springstan <46536646+springstan@users.noreply.github.com> Date: Wed, 4 Dec 2019 11:15:53 +0100 Subject: [PATCH] Move imports to top for maxcube (#29393) --- homeassistant/components/maxcube/__init__.py | 8 ++++---- homeassistant/components/maxcube/climate.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/maxcube/__init__.py b/homeassistant/components/maxcube/__init__.py index 65a969bbcb8..1b65cb161e1 100644 --- a/homeassistant/components/maxcube/__init__.py +++ b/homeassistant/components/maxcube/__init__.py @@ -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] = {} diff --git a/homeassistant/components/maxcube/climate.py b/homeassistant/components/maxcube/climate.py index e09dfc2d99f..ff4b219ec21 100644 --- a/homeassistant/components/maxcube/climate.py +++ b/homeassistant/components/maxcube/climate.py @@ -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