For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /developers/blog/2022-08-15-automation-action-type-deprecation.md.

2022.9 的 AutomationActionType 弃用

对于 Home Assistant Core 2022.9,我们弃用了来自 homeassistant/components/automation/__init__.pyAutomationActionTypeAutomationTriggerInfoAutomationTriggerData。 它们被来自 homeassistant/helpers/trigger.pyTriggerActionTypeTriggerInfoTriggerData 替代。

AutomationActionTypeTriggerActionType
AutomationTriggerInfoTriggerInfo
AutomationTriggerDataTriggerData

此外,我们建议将 async_attach_trigger 函数的 automation_info 参数名更新为 trigger_info