mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Use AddEntitiesCallback type, pt.4 (#49955)
This commit is contained in:
committed by
GitHub
parent
a0feee083c
commit
786c5db5be
@ -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."""
|
||||
|
Reference in New Issue
Block a user