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 @@
|
|||
"""Component that will help set the OpenALPR cloud for ALPR processing."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from base64 import b64encode
|
||||
from http import HTTPStatus
|
||||
|
@ -19,9 +21,11 @@ from homeassistant.components.openalpr_local.image_processing import (
|
|||
ImageProcessingAlprEntity,
|
||||
)
|
||||
from homeassistant.const import CONF_API_KEY, CONF_REGION
|
||||
from homeassistant.core import split_entity_id
|
||||
from homeassistant.core import HomeAssistant, split_entity_id
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -50,7 +54,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Set up the OpenALPR cloud API platform."""
|
||||
confidence = config[CONF_CONFIDENCE]
|
||||
params = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue