Add humidifier setup type hints (#63289)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
ca366e6f87
commit
b9e9445a51
2 changed files with 19 additions and 3 deletions
|
@ -10,7 +10,10 @@ from homeassistant.components.humidifier.const import (
|
|||
MODE_AUTO,
|
||||
SUPPORT_MODES,
|
||||
)
|
||||
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 .const import DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
|
||||
|
||||
|
@ -20,7 +23,11 @@ MODE_MANUAL = "manual"
|
|||
MODE_OFF = "off"
|
||||
|
||||
|
||||
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 ecobee thermostat humidifier entity."""
|
||||
data = hass.data[DOMAIN]
|
||||
entities = []
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
"""Adds support for generic hygrostat units."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
|
@ -23,13 +25,15 @@ from homeassistant.const import (
|
|||
STATE_OFF,
|
||||
STATE_ON,
|
||||
)
|
||||
from homeassistant.core import DOMAIN as HA_DOMAIN, callback
|
||||
from homeassistant.core import DOMAIN as HA_DOMAIN, HomeAssistant, callback
|
||||
from homeassistant.helpers import condition
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.event import (
|
||||
async_track_state_change,
|
||||
async_track_time_interval,
|
||||
)
|
||||
from homeassistant.helpers.restore_state import RestoreEntity
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from . import (
|
||||
CONF_AWAY_FIXED,
|
||||
|
@ -58,7 +62,12 @@ SUPPORT_FLAGS = 0
|
|||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(HYGROSTAT_SCHEMA.schema)
|
||||
|
||||
|
||||
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 generic hygrostat platform."""
|
||||
if discovery_info:
|
||||
config = discovery_info
|
||||
|
|
Loading…
Add table
Reference in a new issue