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

@ -3,7 +3,7 @@ from __future__ import annotations
import logging
import math
from typing import Any, Callable
from typing import Any
from bond_api import Action, BPUPSubscriptions, DeviceType, Direction
@ -17,6 +17,7 @@ from homeassistant.components.fan 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 homeassistant.util.percentage import (
int_states_in_range,
percentage_to_ranged_value,
@ -33,7 +34,7 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: Callable[[list[Entity], bool], None],
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up Bond fan devices."""
data = hass.data[DOMAIN][entry.entry_id]