Add sensor setup type hints [e-f] (#63317)

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

View file

@ -2,7 +2,10 @@
from __future__ import annotations
from homeassistant.components.sensor import SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import COORDINATOR, DOMAIN, NAME, SENSORS
@ -10,7 +13,11 @@ from .const import COORDINATOR, DOMAIN, NAME, SENSORS
ICON = "mdi:flash"
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 envoy sensor platform."""
data = hass.data[DOMAIN][config_entry.entry_id]
coordinator = data[COORDINATOR]