Add binary_sensor setup type hints [h-n] (#63269)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-03 11:32:26 +01:00 committed by GitHub
parent 24fc0df4b0
commit 33e4251606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 207 additions and 30 deletions

View file

@ -1,15 +1,25 @@
"""Support for Lutron Powr Savr occupancy sensors."""
from __future__ import annotations
from pylutron import OccupancyGroup
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from . import LUTRON_CONTROLLER, LUTRON_DEVICES, LutronDevice
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 Lutron occupancy sensors."""
if discovery_info is None:
return