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

@ -1,14 +1,13 @@
"""Support for ISY994 sensors."""
from __future__ import annotations
from typing import Callable
from pyisy.constants import ISY_VALUE_UNKNOWN
from homeassistant.components.sensor import DOMAIN as SENSOR, SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import (
_LOGGER,
@ -28,7 +27,7 @@ from .helpers import convert_isy_value_to_hass, migrate_old_unique_ids
async def async_setup_entry(
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: Callable[[list], None],
async_add_entities: AddEntitiesCallback,
) -> bool:
"""Set up the ISY994 sensor platform."""
hass_isy_data = hass.data[ISY994_DOMAIN][entry.entry_id]