hotkong/dsh-home-assistant-panel ↗★ 1
dsh-home-assistant-panel
Home Assistant panel for DeepSeek Harness: a read-only status overview, environment prompt injection, ha_status and browser notifications. · 把 Home Assistant 的状态面板、环境注入和通知配一次,之后每个会话开局就知道它在哪、什么版本、什么状态。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add dsh-home-assistant-panel说明文档
阅读完整 README ↗配置项
| 字段 | 说明 |
|---|---|
baseUrl | HA 地址,含端口,如 http://homeassistant.local:8123 |
label | 显示名,进注入块与状态卡 |
notes | 自由备注(如「重启约 5 分钟」),只写入注入块;仅注入开启时生效 |
stats | 1–6 个观测项,见下 |
tokenRef / token | 高级:仅 profile YAML。UI 通过凭据服务固定写 HA_TOKEN;tokenRef 是键名,不是令牌 |
inject.enabled / refreshSec / maxChars | 全局注入开关、刷新间隔、字数上限(默认 600) |
inject.workspaces | 工作区白名单:只在这些绝对路径(含子目录)自动注入;空数组 = 所有工作区。ha_status 不受影响 |
status.refreshSec / timeoutMs / showScale | 状态缓存 TTL、请求超时、是否统计规模 |
观测项(stats)
每个观测项二选一:
stats:
# 1) 实体快捷方式(不需要管理员令牌)
- title: 室内温度
entity: sensor.living_room_temperature
unit: " °C"
# 2) Jinja 模板(需要管理员令牌;可做聚合)
- title: 亮灯数
template: "{{ states.light | selectattr('state','eq','on') | list | count }}"
- 可选
attribute读取实体的某个属性; - 单项失败只显示
—,不影响其它项; - 模板只能来自配置,工具参数不接受模板(HA 的模板接口能读取全屋状态)。