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__.py 的 AutomationActionType、AutomationTriggerInfo 和 AutomationTriggerData。 它们被来自 homeassistant/helpers/trigger.py 的 TriggerActionType、TriggerInfo 和 TriggerData 替代。

旧新
AutomationActionTypeTriggerActionType
AutomationTriggerInfoTriggerInfo
AutomationTriggerDataTriggerData

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