Move imports to top for daikin (#29490)
parent
89c7629215
commit
270d97d789
|
@ -5,6 +5,7 @@ import logging
|
|||
|
||||
from aiohttp import ClientConnectionError
|
||||
from async_timeout import timeout
|
||||
from pydaikin.appliance import Appliance
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
||||
|
@ -87,7 +88,6 @@ async def async_unload_entry(hass, config_entry):
|
|||
|
||||
async def daikin_api_setup(hass, host):
|
||||
"""Create a Daikin instance only once."""
|
||||
from pydaikin.appliance import Appliance
|
||||
|
||||
session = hass.helpers.aiohttp_client.async_get_clientsession()
|
||||
try:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"""Support for the Daikin HVAC."""
|
||||
import logging
|
||||
|
||||
from pydaikin import appliance
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice
|
||||
|
@ -91,7 +92,6 @@ class DaikinClimate(ClimateDevice):
|
|||
|
||||
def __init__(self, api):
|
||||
"""Initialize the climate device."""
|
||||
from pydaikin import appliance
|
||||
|
||||
self._api = api
|
||||
self._list = {
|
||||
|
|
|
@ -4,6 +4,7 @@ import logging
|
|||
|
||||
from aiohttp import ClientError
|
||||
from async_timeout import timeout
|
||||
from pydaikin.appliance import Appliance
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
|
@ -32,7 +33,6 @@ class FlowHandler(config_entries.ConfigFlow):
|
|||
|
||||
async def _create_device(self, host):
|
||||
"""Create device."""
|
||||
from pydaikin.appliance import Appliance
|
||||
|
||||
try:
|
||||
device = Appliance(
|
||||
|
|
Loading…
Reference in New Issue