Add cover setup type hints (#63285)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
277562bc38
commit
1ce75f8e6b
24 changed files with 203 additions and 34 deletions
|
@ -1,12 +1,17 @@
|
|||
"""Support for Rflink Cover devices."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.cover import PLATFORM_SCHEMA, CoverEntity
|
||||
from homeassistant.const import CONF_DEVICES, CONF_NAME, CONF_TYPE, STATE_OPEN
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.restore_state import RestoreEntity
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from . import (
|
||||
CONF_ALIASES,
|
||||
|
@ -106,7 +111,12 @@ def devices_from_config(domain_config):
|
|||
return devices
|
||||
|
||||
|
||||
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 Rflink cover platform."""
|
||||
async_add_entities(devices_from_config(config))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue