From cb5f378c664183b899a78cb331b22da2041ee1de Mon Sep 17 00:00:00 2001 From: epenet Date: Thu, 6 Jan 2022 20:56:18 +0000 Subject: [PATCH] Adjust Platform type hint in discovery helper --- homeassistant/helpers/discovery.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/discovery.py b/homeassistant/helpers/discovery.py index 1923ba9556c..890c0dccae2 100644 --- a/homeassistant/helpers/discovery.py +++ b/homeassistant/helpers/discovery.py @@ -11,6 +11,7 @@ from collections.abc import Callable from typing import Any, TypedDict from homeassistant import core, setup +from homeassistant.const import Platform from homeassistant.core import CALLBACK_TYPE from homeassistant.loader import bind_hass @@ -126,7 +127,7 @@ def async_listen_platform( @bind_hass def load_platform( hass: core.HomeAssistant, - component: str, + component: Platform | str, platform: str, discovered: DiscoveryInfoType, hass_config: ConfigType, @@ -142,7 +143,7 @@ def load_platform( @bind_hass async def async_load_platform( hass: core.HomeAssistant, - component: str, + component: Platform | str, platform: str, discovered: DiscoveryInfoType, hass_config: ConfigType,