From 274508f8fd11743bf95f2a048e6a645a09fee5a3 Mon Sep 17 00:00:00 2001 From: Quentame Date: Tue, 26 Nov 2019 19:09:52 +0100 Subject: [PATCH] Move fortigate imports at top-level (#29093) --- homeassistant/components/fortigate/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/fortigate/__init__.py b/homeassistant/components/fortigate/__init__.py index d1f6eb52333..6de55ae3d65 100644 --- a/homeassistant/components/fortigate/__init__.py +++ b/homeassistant/components/fortigate/__init__.py @@ -1,12 +1,13 @@ """Fortigate integration.""" import logging +from pyFGT.fortigate import FGTConnectionError, FortiGate import voluptuous as vol from homeassistant.const import ( + CONF_API_KEY, CONF_DEVICES, CONF_HOST, - CONF_API_KEY, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP, ) @@ -52,8 +53,6 @@ async def async_setup(hass, config): async def async_setup_fortigate(hass, config, host, user, api_key, devices): """Start up the Fortigate component platforms.""" - from pyFGT.fortigate import FGTConnectionError, FortiGate - fgt = FortiGate(host, user, apikey=api_key, disable_request_warnings=True) try: