Reorg device automation (#26880)
* async_trigger -> async_attach_trigger * Reorg device automations * Update docstrings * Fix types * Fix extending schemas
This commit is contained in:
1 parent
b52cfd3409
commit
6fdff9ffab
48 files changed
+2014
-1771
No files matched your search
@@ -13,8 +13,8 @@ TRIGGER_SCHEMA = vol.Schema(
|
||||
)
|
||||
|
||||
|
||||
async def async_trigger(hass, config, action, automation_info):
|
||||
async def async_attach_trigger(hass, config, action, automation_info):
|
||||
"""Listen for trigger."""
|
||||
integration = await async_get_integration(hass, config[CONF_DOMAIN])
|
||||
platform = integration.get_platform("device_automation")
|
||||
return await platform.async_trigger(hass, config, action, automation_info)
|
||||
platform = integration.get_platform("device_trigger")
|
||||
return await platform.async_attach_trigger(hass, config, action, automation_info)
|
||||
Reference in new issue
Block a user