mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Move fortigate imports at top-level (#29093)
This commit is contained in:
parent
915d23158d
commit
274508f8fd
@ -1,12 +1,13 @@
|
|||||||
"""Fortigate integration."""
|
"""Fortigate integration."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from pyFGT.fortigate import FGTConnectionError, FortiGate
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
CONF_API_KEY,
|
||||||
CONF_DEVICES,
|
CONF_DEVICES,
|
||||||
CONF_HOST,
|
CONF_HOST,
|
||||||
CONF_API_KEY,
|
|
||||||
CONF_USERNAME,
|
CONF_USERNAME,
|
||||||
EVENT_HOMEASSISTANT_STOP,
|
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):
|
async def async_setup_fortigate(hass, config, host, user, api_key, devices):
|
||||||
"""Start up the Fortigate component platforms."""
|
"""Start up the Fortigate component platforms."""
|
||||||
from pyFGT.fortigate import FGTConnectionError, FortiGate
|
|
||||||
|
|
||||||
fgt = FortiGate(host, user, apikey=api_key, disable_request_warnings=True)
|
fgt = FortiGate(host, user, apikey=api_key, disable_request_warnings=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user