mirror of
https://github.com/home-assistant/core
synced 2024-07-21 02:25:24 +00:00
Fix incorrect type hint in discovery helper (#63789)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
06e2f58529
commit
51292cc135
|
@ -18,6 +18,7 @@ from homeassistant.const import (
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import discovery
|
from homeassistant.helpers import discovery
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
CONF_AUTHORIZATION,
|
CONF_AUTHORIZATION,
|
||||||
|
@ -147,7 +148,7 @@ LIFE360_SCHEMA = vol.All(
|
||||||
CONFIG_SCHEMA = vol.Schema({DOMAIN: LIFE360_SCHEMA}, extra=vol.ALLOW_EXTRA)
|
CONFIG_SCHEMA = vol.Schema({DOMAIN: LIFE360_SCHEMA}, extra=vol.ALLOW_EXTRA)
|
||||||
|
|
||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up integration."""
|
"""Set up integration."""
|
||||||
conf = config.get(DOMAIN, LIFE360_SCHEMA({}))
|
conf = config.get(DOMAIN, LIFE360_SCHEMA({}))
|
||||||
hass.data[DOMAIN] = {"config": conf, "apis": {}}
|
hass.data[DOMAIN] = {"config": conf, "apis": {}}
|
||||||
|
|
|
@ -129,7 +129,7 @@ def load_platform(
|
||||||
hass: core.HomeAssistant,
|
hass: core.HomeAssistant,
|
||||||
component: Platform | str,
|
component: Platform | str,
|
||||||
platform: str,
|
platform: str,
|
||||||
discovered: DiscoveryInfoType,
|
discovered: DiscoveryInfoType | None,
|
||||||
hass_config: ConfigType,
|
hass_config: ConfigType,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Load a component and platform dynamically."""
|
"""Load a component and platform dynamically."""
|
||||||
|
@ -145,7 +145,7 @@ async def async_load_platform(
|
||||||
hass: core.HomeAssistant,
|
hass: core.HomeAssistant,
|
||||||
component: Platform | str,
|
component: Platform | str,
|
||||||
platform: str,
|
platform: str,
|
||||||
discovered: DiscoveryInfoType,
|
discovered: DiscoveryInfoType | None,
|
||||||
hass_config: ConfigType,
|
hass_config: ConfigType,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Load a component and platform dynamically.
|
"""Load a component and platform dynamically.
|
||||||
|
|
Loading…
Reference in a new issue