Use AddEntitiesCallback type, pt.2 (#49921)

This commit is contained in:
Ruslan Sayfutdinov 2021-04-30 19:38:59 +01:00 committed by GitHub
parent 4ed74cd2f5
commit cbaeec2a4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 91 additions and 103 deletions

View file

@ -1,6 +1,4 @@
"""Support for Notion binary sensors."""
from typing import Callable
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
DEVICE_CLASS_DOOR,
@ -11,6 +9,7 @@ from homeassistant.components.binary_sensor import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import NotionEntity
from .const import (
@ -44,7 +43,7 @@ BINARY_SENSOR_TYPES = {
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: Callable
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
):
"""Set up Notion sensors based on a config entry."""
coordinator = hass.data[DOMAIN][DATA_COORDINATOR][entry.entry_id]