Add sensor setup type hints [o-q] (#63313)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
80b6195505
commit
9184eb8916
21 changed files with 199 additions and 29 deletions
|
@ -5,10 +5,14 @@ from pyplaato.models.device import PlaatoDevice
|
|||
from pyplaato.plaato import PlaatoKeg
|
||||
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.dispatcher import (
|
||||
async_dispatcher_connect,
|
||||
async_dispatcher_send,
|
||||
)
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from . import ATTR_TEMP, SENSOR_UPDATE
|
||||
from ...core import callback
|
||||
|
@ -24,11 +28,18 @@ from .const import (
|
|||
from .entity import PlaatoEntity
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""Set up the Plaato sensor."""
|
||||
|
||||
|
||||
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 Plaato from a config entry."""
|
||||
entry_data = hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue