Add setup type hints [s] (part 2) (#63479)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-05 17:34:18 +01:00 committed by GitHub
parent d61a96f0ab
commit 992f9c3c6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 130 additions and 35 deletions

View file

@ -19,7 +19,9 @@ from homeassistant.const import (
CONF_URL,
)
import homeassistant.core as ha
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.typing import ConfigType
import homeassistant.util.dt as dt_util
ATTR_ADDRESS = "address"
@ -232,7 +234,7 @@ CONFIG_SCHEMA = vol.Schema(
)
def setup(hass, config):
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Register the SpaceAPI with the HTTP interface."""
hass.data[DATA_SPACEAPI] = config[DOMAIN]
hass.http.register_view(APISpaceApiView)