From 613bf1c22690e3817fc970f18ed7fbf9d28c3f22 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 4 Mar 2024 01:11:34 -1000 Subject: [PATCH] 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 --- homeassistant/components/device_automation/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/device_automation/__init__.py b/homeassistant/components/device_automation/__init__.py index 2bf87343c72..91a223217b3 100644 --- a/homeassistant/components/device_automation/__init__.py +++ b/homeassistant/components/device_automation/__init__.py @@ -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"