Add image_processing setup type hints (#63290)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
061ce0c187
commit
ca366e6f87
13 changed files with 143 additions and 26 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Person detection using Sighthound cloud service."""
|
||||
from __future__ import annotations
|
||||
|
||||
import io
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
@ -15,8 +17,10 @@ from homeassistant.components.image_processing import (
|
|||
ImageProcessingEntity,
|
||||
)
|
||||
from homeassistant.const import ATTR_ENTITY_ID, CONF_API_KEY
|
||||
from homeassistant.core import split_entity_id
|
||||
from homeassistant.core import HomeAssistant, split_entity_id
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
import homeassistant.util.dt as dt_util
|
||||
from homeassistant.util.pil import draw_box
|
||||
|
||||
|
@ -43,7 +47,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
def setup_platform(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
add_entities: AddEntitiesCallback,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Set up the platform."""
|
||||
# Validate credentials by processing image.
|
||||
api_key = config[CONF_API_KEY]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue