From ac502980a214d1702c1b486e8b98ce09dea19209 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 21 Feb 2019 14:57:38 -0800 Subject: [PATCH] Do not warn for internally loaded components (#21287) --- homeassistant/loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/loader.py b/homeassistant/loader.py index 50f8b4338d8..3dfc996bb35 100644 --- a/homeassistant/loader.py +++ b/homeassistant/loader.py @@ -83,7 +83,7 @@ def get_platform(hass, # type: HomeAssistant """ # If the platform has a component, we will limit the platform loading path # to be the same source (custom/built-in). - component = get_component(hass, platform_name) + component = _load_file(hass, platform_name, LOOKUP_PATHS) # Until we have moved all platforms under their component/own folder, it # can be that the component is None. @@ -181,7 +181,7 @@ def _load_file(hass, # type: HomeAssistant cache[comp_or_platform] = module - if index == 0: + if module.__name__.startswith(PACKAGE_CUSTOM_COMPONENTS): _LOGGER.warning( 'You are using a custom component for %s which has not ' 'been tested by Home Assistant. This component might '