Define AddEntitiesCallback type (#49812)

This commit is contained in:
Ruslan Sayfutdinov 2021-04-29 11:28:14 +01:00 committed by GitHub
parent de6c9e67b1
commit 0301706fc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 145 additions and 106 deletions

View file

@ -1,6 +1,4 @@
"""Support for MySensors sensors."""
from typing import Callable
from awesomeversion import AwesomeVersion
from homeassistant.components import mysensors
@ -27,6 +25,7 @@ from homeassistant.const import (
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
SENSORS = {
"V_TEMP": [None, "mdi:thermometer"],
@ -64,7 +63,9 @@ SENSORS = {
async def async_setup_entry(
hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: Callable
hass: HomeAssistant,
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
):
"""Set up this platform for a specific ConfigEntry(==Gateway)."""