mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Avoid trying to load platform that are known to not exist in async_prepare_setup_platform (#114659)
This commit is contained in:
parent
9b41e3d124
commit
17da077c74
@ -504,6 +504,12 @@ async def async_prepare_setup_platform(
|
|||||||
log_error(f"Unable to import the component ({exc}).")
|
log_error(f"Unable to import the component ({exc}).")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if not integration.platforms_exists((domain,)):
|
||||||
|
log_error(
|
||||||
|
f"Platform not found (No module named '{integration.pkg_path}.{domain}')"
|
||||||
|
)
|
||||||
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
platform = await integration.async_get_platform(domain)
|
platform = await integration.async_get_platform(domain)
|
||||||
except ImportError as exc:
|
except ImportError as exc:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user