mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Add setup type hints to envisalink (#63785)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
dc71d59141
commit
277c12cf64
@ -12,11 +12,12 @@ from homeassistant.const import (
|
|||||||
EVENT_HOMEASSISTANT_STOP,
|
EVENT_HOMEASSISTANT_STOP,
|
||||||
Platform,
|
Platform,
|
||||||
)
|
)
|
||||||
from homeassistant.core import ServiceCall, callback
|
from homeassistant.core import HomeAssistant, ServiceCall, callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.discovery import async_load_platform
|
from homeassistant.helpers.discovery import async_load_platform
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -102,9 +103,9 @@ SERVICE_SCHEMA = vol.Schema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass, config):
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up for Envisalink devices."""
|
"""Set up for Envisalink devices."""
|
||||||
conf = config.get(DOMAIN)
|
conf = config[DOMAIN]
|
||||||
|
|
||||||
host = conf.get(CONF_HOST)
|
host = conf.get(CONF_HOST)
|
||||||
port = conf.get(CONF_EVL_PORT)
|
port = conf.get(CONF_EVL_PORT)
|
||||||
@ -119,7 +120,7 @@ async def async_setup(hass, config):
|
|||||||
zones = conf.get(CONF_ZONES)
|
zones = conf.get(CONF_ZONES)
|
||||||
partitions = conf.get(CONF_PARTITIONS)
|
partitions = conf.get(CONF_PARTITIONS)
|
||||||
connection_timeout = conf.get(CONF_TIMEOUT)
|
connection_timeout = conf.get(CONF_TIMEOUT)
|
||||||
sync_connect = asyncio.Future()
|
sync_connect: asyncio.Future[bool] = asyncio.Future()
|
||||||
|
|
||||||
controller = EnvisalinkAlarmPanel(
|
controller = EnvisalinkAlarmPanel(
|
||||||
host,
|
host,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user