docs(hass): CSG 电力监控面板重构 — avg price 传感器 + 去重/改名 + 季节切换提醒 (VPS-90)
This commit is contained in:
@@ -279,6 +279,32 @@ updated 2026-08-29 (W1N-240 + W1N-242):** 「本月累计」gauge 对齐夏季
|
||||
数据日)。备份 `csg_sensors.yaml.bak-20260829-w1n242`。验证:Core
|
||||
restart 后回归值不变(334.81 / -0.3 / 10.8 / 90.3 / 200.94 / 180.28)。
|
||||
|
||||
**CSG 面板重构 2026-09-04(VPS-90,先核对计价后展示层改动):** 核对
|
||||
`power-monitor` 计价与 8 月账单一致(198.65 vs 账单 198.64,差 ≤0.01 元,
|
||||
因模板用公众圆整价 0.589/0.639/0.889、账单用 6 位精确价),不改阶梯常量。
|
||||
改动:① `csg_sensors.yaml` Block B 新增
|
||||
`sensor.csg_this_month_avg_price`(本月阶梯电费÷本月用电,`元/kWh`,
|
||||
availability 照 W1N-239 惯例;**csg_* 实体 14→15**);② 面板改名「环比上月」
|
||||
→「环比上月同期」;glance「本月/上月」grid 去重为单卡「上月」(本月用电/电费
|
||||
行归 💰核心数据卡);⚡阶梯电价卡加「本月实际均价」行(当前档位/当前电价/
|
||||
本月实际均价/档位剩余;面板唯一实体引用 20→21);③ `automations.yaml` 加
|
||||
2 条提醒:`automation.csg_mian_ban_qie_dong_ji_dang_ti_xing`(10-25 09:00)
|
||||
与 `automation.csg_mian_ban_qie_xia_ji_dang_ti_xing`(4-25 09:00)经
|
||||
`matrix_e2ee.send_message` 提醒切 gauge。④ 金额单位混排(原生 CNY vs 模板
|
||||
元)**维持**:`config/entity_registry/update` 拒绝自定义文本单位
|
||||
(`extra keys not allowed … Got '元'`),用户确认接受。备份:
|
||||
`.lovelace-backups/dashboard-unknown-power-monitor-20260904-204757-pre-refactor.json`、
|
||||
`.csg-backups/csg_sensors.yaml.bak-20260904-204757-pre-refactor`(及
|
||||
`-205301-pre-avgprice`)、`.automations-backups/automations.yaml.bak-*`。
|
||||
**WS 改法(2026.8,本机实测)**:core/主机 python 无 ws 库、core 容器内经
|
||||
supervisor 代理 WS 被拒(loop prevention),用
|
||||
`docker run --rm --network host -e SUPERVISOR_TOKEN`(supervisor 镜像
|
||||
`aarch64-hassio-supervisor:2026.08.0`)连 `ws://172.30.32.2/core/websocket`;
|
||||
命令名 `lovelace/config`(读)+ `lovelace/config/save`(写),
|
||||
`lovelace/config/get` 已不存在(unknown_command)。验证:新实体
|
||||
0.589 元/kWh、15 个 csg_* 数值齐全、回归值不变(14.09/198.65/331.22/
|
||||
304.99/181.89)、automations on、`ha core check` OK、日志无 template 错误。
|
||||
|
||||
**CSG 长期归档(W1N-243, 2026-08-29):** scribe 库新增 `csg_history`
|
||||
表(逐日 usage/cost/ladder/balance + 逐月累计;2026-07-01 起回填,永久),
|
||||
由 TimescaleDB 每日任务 **1008** `csg_daily_snapshot()`(22:30
|
||||
@@ -292,6 +318,11 @@ ladder/balance 为 22:30 快照值。详见 [hosts/pgdb.md](../hosts/pgdb.md)。
|
||||
> `power-monitor` 视图「本月累计」gauge 切到冬季 `max:450` /
|
||||
> `0/200/400`,**5-01** 切回夏季 `max:650` / `0/260/600`(与模板
|
||||
> `now().month` 季节逻辑对齐;模板常量在 Block B/D `variables`)。
|
||||
> **提醒 automation(2026-09-04 起,VPS-90):**
|
||||
> `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_e2ee.send_message` 发操作步骤提醒;gauge 的 max/segments 无法
|
||||
> 模板化,仍需人工改卡配置。
|
||||
|
||||
Home PPPoE IPv4 to CSG is still blackholed (`curl -4` to `218.19.148.218:443`
|
||||
times out). `end0` IPv6 is enabled (`ipv6.method: auto`); from HA,
|
||||
|
||||
Reference in New Issue
Block a user