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
|
@ -7,8 +7,10 @@ from homeassistant.components.cover import (
|
|||
CoverDeviceClass,
|
||||
CoverEntity,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import STATE_CLOSED, STATE_CLOSING, STATE_OPEN, STATE_OPENING
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import DOMAIN
|
||||
from .entity import OpenGarageEntity
|
||||
|
@ -18,7 +20,9 @@ _LOGGER = logging.getLogger(__name__)
|
|||
STATES_MAP = {0: STATE_CLOSED, 1: STATE_OPEN}
|
||||
|
||||
|
||||
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 the OpenGarage covers."""
|
||||
async_add_entities(
|
||||
[OpenGarageCover(hass.data[DOMAIN][entry.entry_id], entry.unique_id)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue