Add sensor setup type hints [g-h] (#63316)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-03 19:13:59 +01:00 committed by GitHub
parent a9901356c3
commit 30a64bd0f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 150 additions and 25 deletions

View file

@ -1,13 +1,19 @@
"""Support gathering system information of hosts which are running glances."""
from homeassistant.components.sensor import SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_NAME, STATE_UNAVAILABLE
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DATA_UPDATED, DOMAIN, SENSOR_TYPES, GlancesSensorEntityDescription
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 the Glances sensors."""
client = hass.data[DOMAIN][config_entry.entry_id]