Add binary_sensor setup type hints [s-z] (#63271)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
fbabad1d1d
commit
862daff622
28 changed files with 256 additions and 40 deletions
|
@ -36,7 +36,9 @@ from homeassistant.exceptions import TemplateError
|
|||
from homeassistant.helpers import template
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import async_generate_entity_id
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.event import async_call_later
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from . import TriggerUpdateCoordinator
|
||||
from .const import (
|
||||
|
@ -153,7 +155,12 @@ def _async_create_template_tracking_entities(
|
|||
async_add_entities(sensors)
|
||||
|
||||
|
||||
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 template binary sensors."""
|
||||
if discovery_info is None:
|
||||
_async_create_template_tracking_entities(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue