mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Add setup type hints to aws (#63781)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
f984e17d4e
commit
66809464e4
@ -7,6 +7,7 @@ import aiobotocore
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_CREDENTIALS,
|
ATTR_CREDENTIALS,
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
@ -103,13 +104,13 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, entry):
|
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
"""Load a config entry.
|
"""Load a config entry.
|
||||||
|
|
||||||
Validate and save sessions per aws credential.
|
Validate and save sessions per aws credential.
|
||||||
"""
|
"""
|
||||||
config = hass.data.get(DATA_HASS_CONFIG)
|
config = hass.data[DATA_HASS_CONFIG]
|
||||||
conf = hass.data.get(DATA_CONFIG)
|
conf = hass.data[DATA_CONFIG]
|
||||||
|
|
||||||
if entry.source == config_entries.SOURCE_IMPORT:
|
if entry.source == config_entries.SOURCE_IMPORT:
|
||||||
if conf is None:
|
if conf is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user