mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Move imports to top for ihc (#29425)
This commit is contained in:
parent
f4f4c695d9
commit
497674835b
@ -2,6 +2,8 @@
|
|||||||
import logging
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
from defusedxml import ElementTree
|
||||||
|
from ihcsdk.ihccontroller import IHCController
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA
|
from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA
|
||||||
@ -214,7 +216,6 @@ def setup(hass, config):
|
|||||||
|
|
||||||
def ihc_setup(hass, config, conf, controller_id):
|
def ihc_setup(hass, config, conf, controller_id):
|
||||||
"""Set up the IHC component."""
|
"""Set up the IHC component."""
|
||||||
from ihcsdk.ihccontroller import IHCController
|
|
||||||
|
|
||||||
url = conf[CONF_URL]
|
url = conf[CONF_URL]
|
||||||
username = conf[CONF_USERNAME]
|
username = conf[CONF_USERNAME]
|
||||||
@ -272,7 +273,6 @@ def autosetup_ihc_products(
|
|||||||
hass: HomeAssistantType, config, ihc_controller, controller_id
|
hass: HomeAssistantType, config, ihc_controller, controller_id
|
||||||
):
|
):
|
||||||
"""Auto setup of IHC products from the IHC project file."""
|
"""Auto setup of IHC products from the IHC project file."""
|
||||||
from defusedxml import ElementTree
|
|
||||||
|
|
||||||
project_xml = ihc_controller.get_project()
|
project_xml = ihc_controller.get_project()
|
||||||
if not project_xml:
|
if not project_xml:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user