docs(hass): CSG 面板重构入维护 runbook — avg price 传感器 + 季节提醒 automation + WS 改法 (VPS-90)
This commit is contained in:
@@ -307,6 +307,40 @@ There is no long-lived `HA_TOKEN` in the agent environment. Read entity
|
|||||||
states via Supervisor (`SUPERVISOR_TOKEN` after `sudo -n -i`) at
|
states via Supervisor (`SUPERVISOR_TOKEN` after `sudo -n -i`) at
|
||||||
`http://supervisor/core/api/states/<entity_id>`.
|
`http://supervisor/core/api/states/<entity_id>`.
|
||||||
|
|
||||||
|
#### CSG display refactor 2026-09-04 (VPS-90)
|
||||||
|
|
||||||
|
Template/dashboard changes made **after** pricing cross-check (8月账单
|
||||||
|
198.64 元 vs 模板 198.65 元,≤0.01 元;阶梯常量 0.589/0.639/0.889、
|
||||||
|
260/600 夏档未动):
|
||||||
|
|
||||||
|
- `templates/csg_sensors.yaml` Block B 新增
|
||||||
|
`sensor.csg_this_month_avg_price`(本月阶梯电费÷本月用电,`元/kWh`);
|
||||||
|
**csg_* template sensors = 15**。
|
||||||
|
- Panel `power-monitor`(`lovelace.dashboard_unknown`):环比行改名
|
||||||
|
「环比上月同期」;glance「本月/上月」去重为单卡「上月」(本月行归
|
||||||
|
💰核心数据卡);⚡阶梯电价卡加「本月实际均价」行。实体引用 20→21。
|
||||||
|
- `automations.yaml` +2 提醒:`automation.csg_mian_ban_qie_dong_ji_dang_ti_xing`
|
||||||
|
(10-25)/ `automation.csg_mian_ban_qie_xia_ji_dang_ti_xing`(4-25)
|
||||||
|
09:00 Matrix 提醒人工切「本月累计」gauge 季节档(max/segments 不可模板化)。
|
||||||
|
- 金额单位混排(原生 CNY vs 模板 元)**保留**:`config/entity_registry/update`
|
||||||
|
拒绝自定义文本单位(`extra keys not allowed … Got '元'`),已定案接受。
|
||||||
|
|
||||||
|
**WS 改面板(2026.8,本机实测,后续沿用)**: core/主机 python 无 ws 库、
|
||||||
|
core 容器内经 supervisor 代理 WS 被拒(loop prevention)。用
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh -o BatchMode=yes hassio@hass.windy.lan \
|
||||||
|
'sudo -n -i sh -c "docker run --rm -i --network host -e SUPERVISOR_TOKEN \
|
||||||
|
--entrypoint python3 r.hassbus.com/home-assistant/aarch64-hassio-supervisor:2026.08.0 \
|
||||||
|
- < /tmp/x.py"'
|
||||||
|
```
|
||||||
|
|
||||||
|
连 `ws://172.30.32.2/core/websocket`(aiohttp,header `Authorization: Bearer
|
||||||
|
$SUPERVISOR_TOKEN`,随后 auth 帧同 token)。命令名 **`lovelace/config`**(读)
|
||||||
|
+ **`lovelace/config/save`**(写,url_path + 全量 config);`lovelace/config/get`
|
||||||
|
已不存在(unknown_command)。备份与细节见
|
||||||
|
[hosts/hass.windy.lan.md](../hosts/hass.windy.lan.md) § CSG 面板重构 2026-09-04。
|
||||||
|
|
||||||
## Command families intentionally NOT scripted
|
## Command families intentionally NOT scripted
|
||||||
|
|
||||||
These exist in `ha` but are either rare, dangerous, or better done in the web
|
These exist in `ha` but are either rare, dangerous, or better done in the web
|
||||||
|
|||||||
Reference in New Issue
Block a user