From 51292cc135816baf00f50da8d24ee8ee468f6453 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 10 Jan 2022 11:14:31 +0100 Subject: [PATCH] Fix incorrect type hint in discovery helper (#63789) Co-authored-by: epenet --- homeassistant/components/life360/__init__.py | 3 ++- homeassistant/helpers/discovery.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/life360/__init__.py b/homeassistant/components/life360/__init__.py index be77d00f87a..89e7ee680a5 100644 --- a/homeassistant/components/life360/__init__.py +++ b/homeassistant/components/life360/__init__.py @@ -18,6 +18,7 @@ from homeassistant.const import ( from homeassistant.core import HomeAssistant from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv +from homeassistant.helpers.typing import ConfigType from .const import ( CONF_AUTHORIZATION, @@ -147,7 +148,7 @@ LIFE360_SCHEMA = vol.All( 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.""" conf = config.get(DOMAIN, LIFE360_SCHEMA({})) hass.data[DOMAIN] = {"config": conf, "apis": {}} diff --git a/homeassistant/helpers/discovery.py b/homeassistant/helpers/discovery.py index 890c0dccae2..73d2aec4605 100644 --- a/homeassistant/helpers/discovery.py +++ b/homeassistant/helpers/discovery.py @@ -129,7 +129,7 @@ def load_platform( hass: core.HomeAssistant, component: Platform | str, platform: str, - discovered: DiscoveryInfoType, + discovered: DiscoveryInfoType | None, hass_config: ConfigType, ) -> None: """Load a component and platform dynamically.""" @@ -145,7 +145,7 @@ async def async_load_platform( hass: core.HomeAssistant, component: Platform | str, platform: str, - discovered: DiscoveryInfoType, + discovered: DiscoveryInfoType | None, hass_config: ConfigType, ) -> None: """Load a component and platform dynamically.