Add sensor setup type hints [s] (#63310)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
26819d1132
commit
595e8a327c
31 changed files with 283 additions and 39 deletions
|
@ -8,6 +8,7 @@ from homeassistant.components.sensor import (
|
|||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
ELECTRIC_POTENTIAL_VOLT,
|
||||
LENGTH_KILOMETERS,
|
||||
|
@ -15,6 +16,8 @@ from homeassistant.const import (
|
|||
TEMP_CELSIUS,
|
||||
VOLUME_LITERS,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.icon import icon_for_battery_level, icon_for_signal_level
|
||||
|
||||
from .account import StarlineAccount, StarlineDevice
|
||||
|
@ -83,7 +86,9 @@ SENSOR_TYPES: tuple[StarlineSensorEntityDescription, ...] = (
|
|||
)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities):
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
) -> None:
|
||||
"""Set up the StarLine sensors."""
|
||||
account: StarlineAccount = hass.data[DOMAIN][entry.entry_id]
|
||||
entities = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue