From 5fb3f6038bee56b979c5ddd7a5459caeeedc7509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diefferson=20Koderer=20M=C3=B4ro?= Date: Mon, 21 Oct 2019 05:24:26 -0300 Subject: [PATCH] Move imports in itach component (#28005) --- homeassistant/components/itach/remote.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/itach/remote.py b/homeassistant/components/itach/remote.py index 9895b54a50d..5390111890c 100644 --- a/homeassistant/components/itach/remote.py +++ b/homeassistant/components/itach/remote.py @@ -1,19 +1,20 @@ """Support for iTach IR devices.""" import logging +import pyitachip2ir import voluptuous as vol -import homeassistant.helpers.config_validation as cv from homeassistant.components import remote -from homeassistant.const import ( - DEVICE_DEFAULT_NAME, - CONF_NAME, - CONF_MAC, - CONF_HOST, - CONF_PORT, - CONF_DEVICES, -) from homeassistant.components.remote import PLATFORM_SCHEMA +from homeassistant.const import ( + CONF_DEVICES, + CONF_HOST, + CONF_MAC, + CONF_NAME, + CONF_PORT, + DEVICE_DEFAULT_NAME, +) +import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) @@ -55,8 +56,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the ITach connection and devices.""" - import pyitachip2ir - itachip2ir = pyitachip2ir.ITachIP2IR( config.get(CONF_MAC), config.get(CONF_HOST), int(config.get(CONF_PORT)) )