mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +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}).")
|
||||
return None
|
||||
|
||||
if not integration.platforms_exists((domain,)):
|
||||
log_error(
|
||||
f"Platform not found (No module named '{integration.pkg_path}.{domain}')"
|
||||
)
|
||||
return None
|
||||
|
||||
try:
|
||||
platform = await integration.async_get_platform(domain)
|
||||
except ImportError as exc:
|
||||
|
Loading…
x
Reference in New Issue
Block a user