Add sensor setup type hints [o-q] (#63313)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-03 19:10:57 +01:00 committed by GitHub
parent 80b6195505
commit 9184eb8916
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 199 additions and 29 deletions

View file

@ -9,14 +9,16 @@ from homeassistant.components.sensor import (
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
LENGTH_CENTIMETERS,
PERCENTAGE,
SIGNAL_STRENGTH_DECIBELS,
TEMP_CELSIUS,
)
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .entity import OpenGarageEntity
@ -52,7 +54,9 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
)
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 OpenGarage sensors."""
open_garage_data_coordinator = hass.data[DOMAIN][entry.entry_id]
async_add_entities(