Add basic type hints to alexa (#62878)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
e0744625bc
commit
7cf66fa72d
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue