Use AddEntitiesCallback type, pt.2 (#49921)
This commit is contained in:
parent
4ed74cd2f5
commit
cbaeec2a4e
37 changed files with 91 additions and 103 deletions
|
@ -2,7 +2,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from typing import Any, Callable
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.sensor import DEVICE_CLASS_CURRENT, SensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -14,7 +14,7 @@ from homeassistant.const import (
|
|||
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.util.dt import utcnow
|
||||
|
||||
from . import WLEDDataUpdateCoordinator, WLEDDeviceEntity
|
||||
|
@ -24,7 +24,7 @@ from .const import ATTR_LED_COUNT, ATTR_MAX_POWER, CURRENT_MA, DOMAIN
|
|||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
entry: ConfigEntry,
|
||||
async_add_entities: Callable[[list[Entity], bool], None],
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up WLED sensor based on a config entry."""
|
||||
coordinator: WLEDDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue