mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
moved imports to top level (#27496)
This commit is contained in:
parent
468e6c30b3
commit
2c8e24eb14
@ -3,6 +3,8 @@ import asyncio
|
|||||||
import logging
|
import logging
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
import aiobotocore
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
@ -151,7 +153,6 @@ async def async_setup_entry(hass, entry):
|
|||||||
|
|
||||||
async def _validate_aws_credentials(hass, credential):
|
async def _validate_aws_credentials(hass, credential):
|
||||||
"""Validate AWS credential config."""
|
"""Validate AWS credential config."""
|
||||||
import aiobotocore
|
|
||||||
|
|
||||||
aws_config = credential.copy()
|
aws_config = credential.copy()
|
||||||
del aws_config[CONF_NAME]
|
del aws_config[CONF_NAME]
|
||||||
|
@ -4,6 +4,8 @@ import base64
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import aiobotocore
|
||||||
|
|
||||||
from homeassistant.components.notify import (
|
from homeassistant.components.notify import (
|
||||||
ATTR_TARGET,
|
ATTR_TARGET,
|
||||||
ATTR_TITLE,
|
ATTR_TITLE,
|
||||||
@ -26,7 +28,6 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
async def get_available_regions(hass, service):
|
async def get_available_regions(hass, service):
|
||||||
"""Get available regions for a service."""
|
"""Get available regions for a service."""
|
||||||
import aiobotocore
|
|
||||||
|
|
||||||
session = aiobotocore.get_session()
|
session = aiobotocore.get_session()
|
||||||
# get_available_regions is not a coroutine since it does not perform
|
# get_available_regions is not a coroutine since it does not perform
|
||||||
@ -41,8 +42,6 @@ async def async_get_service(hass, config, discovery_info=None):
|
|||||||
_LOGGER.error("Please config aws notify platform in aws component")
|
_LOGGER.error("Please config aws notify platform in aws component")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
import aiobotocore
|
|
||||||
|
|
||||||
session = None
|
session = None
|
||||||
|
|
||||||
conf = discovery_info
|
conf = discovery_info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user