Switch config to use async_get_component/async_get_platform (#112071)
This commit is contained in:
parent
08897137ff
commit
3808e8b0bc
2 changed files with 23 additions and 21 deletions
|
@ -1418,7 +1418,7 @@ async def async_process_component_config( # noqa: C901
|
|||
config_exceptions: list[ConfigExceptionInfo] = []
|
||||
|
||||
try:
|
||||
component = integration.get_component()
|
||||
component = await integration.async_get_component()
|
||||
except LOAD_EXCEPTIONS as exc:
|
||||
exc_info = ConfigExceptionInfo(
|
||||
exc,
|
||||
|
@ -1433,7 +1433,7 @@ async def async_process_component_config( # noqa: C901
|
|||
# Check if the integration has a custom config validator
|
||||
config_validator = None
|
||||
try:
|
||||
config_validator = integration.get_platform("config")
|
||||
config_validator = await integration.async_get_platform("config")
|
||||
except ImportError as err:
|
||||
# Filter out import error of the config platform.
|
||||
# If the config platform contains bad imports, make sure
|
||||
|
@ -1557,7 +1557,7 @@ async def async_process_component_config( # noqa: C901
|
|||
continue
|
||||
|
||||
try:
|
||||
platform = p_integration.get_platform(domain)
|
||||
platform = await p_integration.async_get_platform(domain)
|
||||
except LOAD_EXCEPTIONS as exc:
|
||||
exc_info = ConfigExceptionInfo(
|
||||
exc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue