Add sensor setup type hints [t-v] (#63309)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-03 19:20:39 +01:00 committed by GitHub
parent d24ebc3c10
commit 6f93ffb7ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 195 additions and 22 deletions

View file

@ -13,7 +13,9 @@ from homeassistant.components.sensor import (
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS, TEMP_FAHRENHEIT, TIME_MINUTES
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import VenstarDataUpdateCoordinator, VenstarEntity
from .const import DOMAIN
@ -64,7 +66,11 @@ class VenstarSensorEntityDescription(SensorEntityDescription, VenstarSensorTypeM
"""Base description of a Sensor entity."""
async def async_setup_entry(hass, config_entry, async_add_entities) -> None:
async def async_setup_entry(
hass: HomeAssistant,
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up Vensar device binary_sensors based on a config entry."""
coordinator = hass.data[DOMAIN][config_entry.entry_id]
entities: list[Entity] = []