diff --git a/homeassistant/components/alexa/__init__.py b/homeassistant/components/alexa/__init__.py index d388a22983f..d28ff5dc804 100644 --- a/homeassistant/components/alexa/__init__.py +++ b/homeassistant/components/alexa/__init__.py @@ -8,7 +8,9 @@ from homeassistant.const import ( CONF_NAME, CONF_PASSWORD, ) +from homeassistant.core import HomeAssistant from homeassistant.helpers import config_validation as cv, entityfilter +from homeassistant.helpers.typing import ConfigType from . import flash_briefings, intent, smart_home_http from .const import ( @@ -78,7 +80,7 @@ CONFIG_SCHEMA = vol.Schema( ) -async def async_setup(hass, config): +async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Activate the Alexa component.""" if DOMAIN not in config: return True diff --git a/homeassistant/components/alexa/smart_home_http.py b/homeassistant/components/alexa/smart_home_http.py index 237828987e8..9651b8cad15 100644 --- a/homeassistant/components/alexa/smart_home_http.py +++ b/homeassistant/components/alexa/smart_home_http.py @@ -4,7 +4,9 @@ import logging from homeassistant import core from homeassistant.components.http.view import HomeAssistantView from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, ENTITY_CATEGORIES +from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er +from homeassistant.helpers.typing import ConfigType from .auth import Auth from .config import AbstractConfig @@ -85,7 +87,7 @@ class AlexaConfig(AbstractConfig): return await self._auth.async_do_auth(code) -async def async_setup(hass, config): +async def async_setup(hass: HomeAssistant, config: ConfigType) -> None: """Activate Smart Home functionality of Alexa component. This is optional, triggered by having a `smart_home:` sub-section in the