diff --git a/homeassistant/components/aws/__init__.py b/homeassistant/components/aws/__init__.py index 600874b0d25..19563efa144 100644 --- a/homeassistant/components/aws/__init__.py +++ b/homeassistant/components/aws/__init__.py @@ -7,7 +7,12 @@ import aiobotocore import voluptuous as vol from homeassistant import config_entries -from homeassistant.const import ATTR_CREDENTIALS, CONF_NAME, CONF_PROFILE_NAME +from homeassistant.const import ( + ATTR_CREDENTIALS, + CONF_NAME, + CONF_PROFILE_NAME, + CONF_SERVICE, +) from homeassistant.helpers import config_validation as cv, discovery # Loading the config flow file will register the flow @@ -20,7 +25,6 @@ from .const import ( CONF_NOTIFY, CONF_REGION, CONF_SECRET_ACCESS_KEY, - CONF_SERVICE, CONF_VALIDATE, DATA_CONFIG, DATA_HASS_CONFIG, @@ -152,7 +156,6 @@ async def async_setup_entry(hass, entry): async def _validate_aws_credentials(hass, credential): """Validate AWS credential config.""" - aws_config = credential.copy() del aws_config[CONF_NAME] del aws_config[CONF_VALIDATE] diff --git a/homeassistant/components/aws/const.py b/homeassistant/components/aws/const.py index 499f4413596..8be6afec7ff 100644 --- a/homeassistant/components/aws/const.py +++ b/homeassistant/components/aws/const.py @@ -10,8 +10,6 @@ CONF_CONTEXT = "context" CONF_CREDENTIAL_NAME = "credential_name" CONF_CREDENTIALS = "credentials" CONF_NOTIFY = "notify" -CONF_PROFILE_NAME = "profile_name" CONF_REGION = "region_name" CONF_SECRET_ACCESS_KEY = "aws_secret_access_key" -CONF_SERVICE = "service" CONF_VALIDATE = "validate" diff --git a/homeassistant/components/aws/notify.py b/homeassistant/components/aws/notify.py index 13fa189a318..f487bc7aab3 100644 --- a/homeassistant/components/aws/notify.py +++ b/homeassistant/components/aws/notify.py @@ -12,24 +12,21 @@ from homeassistant.components.notify import ( ATTR_TITLE_DEFAULT, BaseNotificationService, ) -from homeassistant.const import CONF_NAME, CONF_PLATFORM +from homeassistant.const import ( + CONF_NAME, + CONF_PLATFORM, + CONF_PROFILE_NAME, + CONF_SERVICE, +) from homeassistant.helpers.json import JSONEncoder -from .const import ( - CONF_CONTEXT, - CONF_CREDENTIAL_NAME, - CONF_PROFILE_NAME, - CONF_REGION, - CONF_SERVICE, - DATA_SESSIONS, -) +from .const import CONF_CONTEXT, CONF_CREDENTIAL_NAME, CONF_REGION, DATA_SESSIONS _LOGGER = logging.getLogger(__name__) async def get_available_regions(hass, service): """Get available regions for a service.""" - session = aiobotocore.get_session() # get_available_regions is not a coroutine since it does not perform # network I/O. But it still perform file I/O heavily, so put it into