mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Migrate device_automation to use async_get_platform (#112162)
This ensures that if device_automation loads an integration's platform it will get loaded in the executor if enabled
This commit is contained in:
parent
9d7c947d19
commit
613bf1c226
@ -172,7 +172,7 @@ async def async_get_device_automation_platform(
|
|||||||
platform_name = automation_type.value.section
|
platform_name = automation_type.value.section
|
||||||
try:
|
try:
|
||||||
integration = await async_get_integration_with_requirements(hass, domain)
|
integration = await async_get_integration_with_requirements(hass, domain)
|
||||||
platform = integration.get_platform(platform_name)
|
platform = await integration.async_get_platform(platform_name)
|
||||||
except IntegrationNotFound as err:
|
except IntegrationNotFound as err:
|
||||||
raise InvalidDeviceAutomationConfig(
|
raise InvalidDeviceAutomationConfig(
|
||||||
f"Integration '{domain}' not found"
|
f"Integration '{domain}' not found"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user