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:
J. Nick Koston 2024-03-04 01:11:34 -10:00 committed by GitHub
parent 9d7c947d19
commit 613bf1c226
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,7 +172,7 @@ async def async_get_device_automation_platform(
platform_name = automation_type.value.section
try:
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:
raise InvalidDeviceAutomationConfig(
f"Integration '{domain}' not found"