Define AddEntitiesCallback type (#49812)
This commit is contained in:
parent
de6c9e67b1
commit
0301706fc6
41 changed files with 145 additions and 106 deletions
|
@ -1,12 +1,10 @@
|
|||
"""Sensor platform for Hass.io addons."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Callable
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
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 . import ADDONS_COORDINATOR
|
||||
from .const import ATTR_VERSION, ATTR_VERSION_LATEST
|
||||
|
@ -16,7 +14,7 @@ from .entity import HassioAddonEntity, HassioOSEntity
|
|||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
async_add_entities: Callable[[list[Entity], bool], None],
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Sensor set up for Hass.io config entry."""
|
||||
coordinator = hass.data[ADDONS_COORDINATOR]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue