From f174aa1219feb2e377d4fd2d03e70ee6f1920668 Mon Sep 17 00:00:00 2001 From: windyboy Date: Sat, 29 Aug 2026 21:08:13 +0800 Subject: [PATCH] =?UTF-8?q?docs(hass):=20CSG=20=E5=A4=8D=E6=A0=B8=E9=81=97?= =?UTF-8?q?=E7=95=99=E4=BF=AE=E5=A4=8D=20=E2=80=94=20=E6=A8=A1=E6=9D=BF=20?= =?UTF-8?q?days[-1]=20=E8=A1=A5=E6=8E=92=E5=BA=8F=20+=20=E6=9C=AC=E6=9C=88?= =?UTF-8?q?=E6=97=A5=E5=9D=87/=E9=A2=84=E6=B5=8B=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E4=B8=8A=E5=B1=8F=20(W1N-242)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/hass.windy.lan.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hosts/hass.windy.lan.md b/hosts/hass.windy.lan.md index 716829b..f6d7f29 100644 --- a/hosts/hass.windy.lan.md +++ b/hosts/hass.windy.lan.md @@ -261,16 +261,24 @@ ladder), ladder cost 180.28 unchanged, `ha core check` OK after restart, no template errors; 14 csg_* entities total. **电力监控面板(`lovelace.dashboard_unknown` / view `power-monitor`) -updated 2026-08-29 (W1N-240):** 「本月累计」gauge 对齐夏季阶梯: +updated 2026-08-29 (W1N-240 + W1N-242):** 「本月累计」gauge 对齐夏季阶梯: `max:650`、segments `0/260/600`(绿/橙/红 = 一/二/三档;冬季 11-01 需切 `max:450`、`0/200/400` — **seasonal switch point**,见下文)。「📊 统计 数据」卡新增本年/去年 4 行(原生传感器,口径标注「电费(账单)」、本年 -「(至今)」);面板共引用 18 个实体。改前备份: +「(至今)」)+ 本月日均/预测进度 2 行(`csg_this_month_daily_avg` / +`csg_prediction_progress`,W1N-242);面板共引用 **20** 个实体。改前备份: `/homeassistant/.lovelace-backups/dashboard-unknown-power-monitor-20260829-204845.json` +(W1N-240)、`-20260829-210708.json`(W1N-242) (改法:WS `lovelace/config/save`,参数 `url_path: dashboard-unknown` + -`config`;勿直改 `.storage/`)。验证:WS 读回 18 实体 diff ✓、gauge +`config`;勿直改 `.storage/`)。验证:WS 读回 18→20 实体 diff ✓、gauge 配置一致 ✓、URL `http://hass.windy.lan:8123/dashboard-unknown/power-monitor`。 +**`csg_sensors.yaml` W1N-242:** `csg_predicted_usage` / +`csg_mom_change` / `csg_this_month_daily_avg` 三处取 `days[-1]` 前补 +`sort(attribute='date')`(与 `csg_yesterday_kwh` 一致,防上游乱序取错 +数据日)。备份 `csg_sensors.yaml.bak-20260829-w1n242`。验证:Core +restart 后回归值不变(334.81 / -0.3 / 10.8 / 90.3 / 200.94 / 180.28)。 + > **Seasonal gauge switch (W1N-240 已知事项):** 每年 **11-01** 把 > `power-monitor` 视图「本月累计」gauge 切到冬季 `max:450` / > `0/200/400`,**5-01** 切回夏季 `max:650` / `0/260/600`(与模板