Move imports in nuheat component (#28038)
* Move imports in nuheat component * Fix tox tests * Fix tox tests * Update tests/components/nuheat/test_init.py @Balloob suggested the change because direct replacement, the mock would never be reverted and impact the other tests. Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
1 parent
b1a374062b
commit
14be60e5bf
3 files changed
+9
-10
No files matched your search
@@ -1,11 +1,11 @@
|
||||
"""Support for NuHeat thermostats."""
|
||||
import logging
|
||||
|
||||
import nuheat
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD, CONF_DEVICES
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers import discovery
|
||||
from homeassistant.const import CONF_DEVICES, CONF_PASSWORD, CONF_USERNAME
|
||||
from homeassistant.helpers import config_validation as cv, discovery
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -29,8 +29,6 @@ CONFIG_SCHEMA = vol.Schema(
|
||||
|
||||
def setup(hass, config):
|
||||
"""Set up the NuHeat thermostat component."""
|
||||
import nuheat
|
||||
|
||||
conf = config[DOMAIN]
|
||||
username = conf.get(CONF_USERNAME)
|
||||
password = conf.get(CONF_PASSWORD)
|
||||
|
||||
@@ -9,9 +9,9 @@ from homeassistant.components.climate.const import (
|
||||
HVAC_MODE_AUTO,
|
||||
HVAC_MODE_HEAT,
|
||||
HVAC_MODE_OFF,
|
||||
PRESET_NONE,
|
||||
SUPPORT_PRESET_MODE,
|
||||
SUPPORT_TARGET_TEMPERATURE,
|
||||
PRESET_NONE,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID,
|
||||
|
||||
Reference in new issue
Block a user