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 /home-assistant/docs/scripts.md.
搜索
返回首页
Home Assistant
安装
入门指南
集成
仪表盘
常见任务
语音控制
更多
云服务
开发者
文档
常见问题
博客
主题
菜单
目录
#
脚本
复制 Markdown
脚本是可以在 Home Assistant 中执行的自动化动作序列。
#
脚本组件
条件
- 在脚本中使用条件判断
执行动作
- 调用服务和执行动作
#
脚本功能
脚本可以:
按顺序执行多个动作
使用条件控制执行流程
被自动化或其他脚本调用
通过服务调用触发
脚本与自动化的区别:
脚本
- 可重复使用的动作序列
自动化
- 由触发器激活的自动化规则