Use AddEntitiesCallback type, pt.4 (#49955)
This commit is contained in:
parent
a0feee083c
commit
786c5db5be
14 changed files with 37 additions and 48 deletions
|
@ -1,14 +1,13 @@
|
|||
"""Support for KNX/IP binary sensors."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, Callable
|
||||
from typing import Any
|
||||
|
||||
from xknx.devices import BinarySensor as XknxBinarySensor
|
||||
|
||||
from homeassistant.components.binary_sensor import DEVICE_CLASSES, BinarySensorEntity
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
from homeassistant.util import dt
|
||||
|
||||
|
@ -19,7 +18,7 @@ from .knx_entity import KnxEntity
|
|||
async def async_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
async_add_entities: Callable[[Iterable[Entity]], None],
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Set up binary sensor(s) for KNX platform."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue