Add sensor setup type hints [i-l] (#63315)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
9184eb8916
commit
a9901356c3
16 changed files with 160 additions and 21 deletions
|
@ -9,8 +9,11 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from .const import (
|
||||
ATTR_AGENCY,
|
||||
|
@ -30,7 +33,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Create the launch sensor."""
|
||||
name = config[CONF_NAME]
|
||||
session = async_get_clientsession(hass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue