M8-R17: allocate thermal standing costs by service
This commit is contained in:
@@ -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 breakdown;Hot 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` 继续显示全部 standing;provider 只读取 `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 虽然
|
||||
|
||||
@@ -77,7 +77,13 @@ docker compose -f docker-compose.yml run --rm migration
|
||||
|
||||
成本页的 15 分钟 ledger 分开显示 heating 与 hot-water 三项 variable breakdown;fixed 费只在合同级 summary 按本地自然日计提一次,all-in = variable + fixed。用显式 recompute 来验证测试时间窗时,应手算并核对 Decimal 金额,保留原有 electricity 合同和数字不变。
|
||||
|
||||
在 Config 的 HA Expose 中只开启需要的 source、Meter 与 thermal entities。核对 unit、state class、availability、today reset 和换表后 identity;关闭 toggle 后应用会清理 retained discovery。不要把 source secret、设备 identity 或合同金额放进 HA entity 名称、日志或截图。
|
||||
在 Config 的 HA Expose 中只开启需要的 source、Meter 与 thermal entities。`Thermal Heating Total/Today`
|
||||
显示 heating variable 加上 heating network、metering、delivery set 与 other 固定费;`Thermal Hot Water
|
||||
Total/Today` 显示 hot-water heating、water、water tax variable 加上 hot-water network 固定费。两条合计
|
||||
恰好等于 `Thermal All-in Total/Today`;component entities 仍仅显示各自 variable,`Fixed` 仍显示全部
|
||||
standing,避免重复计费。数值仍来自在 01:05 后结算的 summary。核对 unit、state class、availability、today
|
||||
reset 和换表后 identity;关闭 toggle 后应用会清理 retained discovery。不要把 source secret、设备 identity
|
||||
或合同金额放进 HA entity 名称、日志或截图。
|
||||
|
||||
## 安全回滚
|
||||
|
||||
|
||||
Reference in New Issue
Block a user