Add sensor setup type hints [e-f] (#63317)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
4363852178
commit
d24ebc3c10
21 changed files with 191 additions and 26 deletions
|
@ -6,10 +6,13 @@ from aioeafm import get_station
|
|||
import async_timeout
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, LENGTH_METERS
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
from homeassistant.helpers.device_registry import DeviceEntryType
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.update_coordinator import (
|
||||
CoordinatorEntity,
|
||||
DataUpdateCoordinator,
|
||||
|
@ -33,7 +36,11 @@ def get_measures(station_data):
|
|||
return station_data["measures"]
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up UK Flood Monitoring Sensors."""
|
||||
station_key = config_entry.data["station"]
|
||||
session = async_get_clientsession(hass=hass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue