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

@ -4,7 +4,7 @@ from __future__ import annotations
from abc import abstractmethod
from collections.abc import Mapping
import logging
from typing import Any, Callable
from typing import Any
from pyclimacell.const import CURRENT
@ -20,7 +20,7 @@ from homeassistant.const import (
CONF_UNIT_SYSTEM_METRIC,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.util import slugify
from . import ClimaCellDataUpdateCoordinator, ClimaCellEntity
@ -40,7 +40,7 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
hass: HomeAssistant,
config_entry: ConfigEntry,
async_add_entities: Callable[[list[Entity], bool], None],
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up a config entry."""
coordinator = hass.data[DOMAIN][config_entry.entry_id]