Avoid trying to load platform that are known to not exist in async_prepare_setup_platform (#114659)
parent
02dee34338
commit
639c4a843b
|
@ -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…
Reference in New Issue