Use AddEntitiesCallback type, pt.2 (#49921)
This commit is contained in:
parent
4ed74cd2f5
commit
cbaeec2a4e
37 changed files with 91 additions and 103 deletions
|
@ -1,8 +1,6 @@
|
|||
"""Sensors flow for Withings."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Callable
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_OCCUPANCY,
|
||||
DOMAIN as BINARY_SENSOR_DOMAIN,
|
||||
|
@ -10,7 +8,7 @@ from homeassistant.components.binary_sensor import (
|
|||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .common import BaseWithingsSensor, async_create_entities
|
||||
|
||||
|
@ -18,7 +16,7 @@ from .common import BaseWithingsSensor, async_create_entities
|
|||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
entry: ConfigEntry,
|
||||
async_add_entities: Callable[[list[Entity], bool], None],
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the sensor config entry."""
|
||||
entities = await async_create_entities(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue