Use AddEntitiesCallback type, pt.4 (#49955)

This commit is contained in:
Ruslan Sayfutdinov
2021-05-04 13:50:06 +01:00
committed by GitHub
parent a0feee083c
commit 786c5db5be
14 changed files with 37 additions and 48 deletions

View File

@ -9,7 +9,7 @@ import logging
import os
import socket
import sys
from typing import Any, Callable, cast
from typing import Any, cast
import psutil
import voluptuous as vol
@ -36,6 +36,7 @@ from homeassistant.helpers.dispatcher import (
async_dispatcher_send,
)
from homeassistant.helpers.entity_component import DEFAULT_SCAN_INTERVAL
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.typing import ConfigType
from homeassistant.util import slugify
@ -198,7 +199,7 @@ class SensorData:
async def async_setup_platform(
hass: HomeAssistant,
config: ConfigType,
async_add_entities: Callable,
async_add_entities: AddEntitiesCallback,
discovery_info: Any | None = None,
) -> None:
"""Set up the system monitor sensors."""