M8-R17: allocate thermal standing costs by service

This commit is contained in:
2026-08-28 14:24:57 +02:00
parent 6e197d7808
commit 5e1545efad
4 changed files with 90 additions and 4 deletions
+11 -1
View File
@@ -1222,7 +1222,17 @@ Assistant Energy Water 所要求的 `water`;保留 `m³` 与 `total_increasing
### M8-R15 — HA Discovery identity/topic repair
修复 HA 将多值 `device.identifiers` 任一匹配合并的风险:Source、Meter、Modbus 与成本 epoch 均使用单一完整 namespaced identifier,内部 MQTT identity 独立保存。thermal 的既有点号 identity/key 保持兼容,node/object topic segment 单独规范化;仅对 v1.6.1 实际发布过的 dot topic 做可重试、成功后抑制的精确 retained cleanup。新增默认关闭的 `Thermal Hot Water Total/Today`,金额为 `hot_water_heating + hot_water`,不含 `hot_water_tax`
修复 HA 将多值 `device.identifiers` 任一匹配合并的风险:Source、Meter、Modbus 与成本 epoch 均使用单一完整 namespaced identifier,内部 MQTT identity 独立保存。thermal 的既有点号 identity/key 保持兼容,node/object topic segment 单独规范化;仅对 v1.6.1 实际发布过的 dot topic 做可重试、成功后抑制的精确 retained cleanup。新增默认关闭的 `Thermal Hot Water Total/Today`;其后由 R17 明确为 hot-water 的 all-in 分配值
### M8-R17 — Thermal HA standing-cost allocation
保持全部 thermal HA entity key、unique_id 与名称不变,只调整 `Thermal Heating Total/Today`
`Thermal Hot Water Total/Today` 的数值语义。Heating 为 `heating` variable 加上
`heating_network``metering``delivery_set``other` 四项 fixed breakdownHot Water 为
`hot_water_heating + hot_water + hot_water_tax` 加上 `hot_water_network`。因此两者之和精确等于
`Thermal All-in Total/Today`,每项 standing 只分配一次。component 实体(hot-water heating、water、
water tax)继续只显示 variable`Fixed` 继续显示全部 standingprovider 只读取 `meter_cost.summarize`
在 01:05 结算后的结果,不改 15 分钟 ledger、API/schema 或数据库。
M8 交付后的 Meter lifecycle 修复链记录在本地 `review-notes/M8-meter-lifecycle-repair-plan.md`
它不新增 ORM / **数据库** schema 或 Alembic revision,不做启动自动修复、一次性数据脚本或历史删除;R08 虽然