Add sensor setup type hints [i-l] (#63315)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
9184eb8916
commit
a9901356c3
16 changed files with 160 additions and 21 deletions
|
@ -6,6 +6,7 @@ from homeassistant.components.sensor import (
|
|||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
CONF_DEVICES,
|
||||
CONF_NAME,
|
||||
|
@ -15,9 +16,10 @@ from homeassistant.const import (
|
|||
PERCENTAGE,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import DOMAIN as KONNECTED_DOMAIN, SIGNAL_DS18B20_NEW
|
||||
|
||||
|
@ -37,7 +39,11 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = {
|
|||
}
|
||||
|
||||
|
||||
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 sensors attached to a Konnected device from a config entry."""
|
||||
data = hass.data[KONNECTED_DOMAIN]
|
||||
device_id = config_entry.data["id"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue