SuperAPI AI 工具集

home-assistant

通用与其它

查看项目

更新于 10-16 01:26

技能介绍

用途:协助处理 Home Assistant 的搭建与维护,包括创建自动化、修改仪表盘、检查实体状态和调试自动化。

主要能力:通过脚本查询实例中的实体、状态与服务;按关键词搜索相似实体与已有自动化作为模板;查看自动化状态与执行历史;基于轨迹分析定位失败原因;生成可复制粘贴的自动化与 Lovelace 仪表盘 YAML。

使用方式:脚本依赖环境变量 HA_TOKEN(Home Assistant 长期访问令牌),实例地址为 http://homeassistant.local:8123。脚本使用 uv 运行并自动安装依赖,例如:uv run scripts/ha_get_entities.py light;uv run scripts/ha_get_state.py light.living_room;uv run scripts/ha_search_similar_entities.py "motion";uv run scripts/ha_get_automations.py motion。轨迹分析需用数字自动化 ID:uv run scripts/ha_trace_summary.py 1761430536701、uv run scripts/ha_list_traces.py 1761430536701、uv run scripts/ha_get_trace.py 1761430536701 <run_id>。配置查询:uv run scripts/ha_get_config.py、uv run scripts/ha_get_config_entries.py telegram_bot。服务调用:uv run scripts/ha_call_service.py light turn_on '{"entity_id": "light.living_room"}'。Telegram 通知需用 telegram_bot.send_message 服务并带上 config_entry_id。

适用场景:新建自动化前查找现有实体与类似示例;调试自动化失败;生成仪表盘卡片配置;排查运行历史与成功率。

限制:生成的 YAML 需用户手动复制到 Home Assistant(自动化在 配置→自动化与场景→添加→在 YAML 中编辑;仪表盘在 原始配置编辑器);调用会改变状态的服务需谨慎,通常仅在用户明确要求或测试时使用;截图依赖 Playwright 浏览器自动化且认证由用户处理。收费、价格与其他平台信息暂未提供。