Use AddEntitiesCallback type, pt.2 (#49921)
This commit is contained in:
parent
4ed74cd2f5
commit
cbaeec2a4e
37 changed files with 91 additions and 103 deletions
|
@ -1,10 +1,9 @@
|
|||
"""Support for Notion sensors."""
|
||||
from typing import Callable
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import TEMP_CELSIUS
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
||||
from . import NotionEntity
|
||||
|
@ -14,7 +13,7 @@ SENSOR_TYPES = {SENSOR_TEMPERATURE: ("Temperature", "temperature", TEMP_CELSIUS)
|
|||
|
||||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: Callable
|
||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
):
|
||||
"""Set up Notion sensors based on a config entry."""
|
||||
coordinator = hass.data[DOMAIN][DATA_COORDINATOR][entry.entry_id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue