mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 18:39:30 +00:00
Migrate condition/state/trigger helper to use async_get_platform (#112144)
Currently these would always load the platform in the loop if it was not already loaded
This commit is contained in:
@@ -222,7 +222,7 @@ async def _async_get_trigger_platform(
|
||||
except IntegrationNotFound:
|
||||
raise vol.Invalid(f"Invalid platform '{platform}' specified") from None
|
||||
try:
|
||||
return integration.get_platform("trigger")
|
||||
return await integration.async_get_platform("trigger")
|
||||
except ImportError:
|
||||
raise vol.Invalid(
|
||||
f"Integration '{platform}' does not provide trigger support"
|
||||
|
||||
Reference in New Issue
Block a user