Add binary_sensor setup type hints [a-f] (#63268)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-03 13:10:41 +01:00 committed by GitHub
parent 6f4b25950c
commit fbabad1d1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 222 additions and 29 deletions

View file

@ -1,19 +1,29 @@
"""Support for Home Assistant Cloud binary sensors."""
from __future__ import annotations
import asyncio
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from .const import DISPATCHER_REMOTE_UPDATE, DOMAIN
WAIT_UNTIL_CHANGE = 3
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 cloud binary sensors."""
if discovery_info is None:
return