Use AddEntitiesCallback type, pt.3 (#49953)
This commit is contained in:
parent
4d939486a9
commit
004fa63dbe
34 changed files with 113 additions and 106 deletions
|
@ -2,8 +2,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Iterable
|
||||
from typing import Callable
|
||||
|
||||
from verisure import Error as VerisureError
|
||||
|
||||
|
@ -11,8 +9,11 @@ from homeassistant.components.lock import LockEntity
|
|||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_CODE, STATE_LOCKED, STATE_UNLOCKED
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import DeviceInfo, Entity
|
||||
from homeassistant.helpers.entity_platform import async_get_current_platform
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import (
|
||||
AddEntitiesCallback,
|
||||
async_get_current_platform,
|
||||
)
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
|
||||
from .const import (
|
||||
|
@ -31,7 +32,7 @@ from .coordinator import VerisureDataUpdateCoordinator
|
|||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
entry: ConfigEntry,
|
||||
async_add_entities: Callable[[Iterable[Entity]], None],
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up Verisure alarm control panel from a config entry."""
|
||||
coordinator: VerisureDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue