From f9cbeb0fc0999df721a8c5bac04fd9135aa45249 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Fri, 17 Jul 2026 00:20:41 +0200 Subject: [PATCH] fix(heatpump-dhw-loading): dedupe scrape-residue series with max by (entity) All four panels queried raw HA metrics that still carry ~12 duplicate series per entity in the 90d window (two scrape jobs x six pod lifetimes; the duplicate-scrape bug was fixed 2026-07-16 but the residue stays in range queries until it ages out). This broke the scatter join (no points rendered), made the stat panel show 8 conflicting averages, and drew rainbow duplicates in both time series. Wrapping every target in max by (entity) (...) collapses the residue to one series per entity; values between the duplicate jobs were near-identical, so max is lossless. --- .../monitoring/dashboards/heatpump-dhw-loading.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kubernetes/apps/monitoring/dashboards/heatpump-dhw-loading.json b/kubernetes/apps/monitoring/dashboards/heatpump-dhw-loading.json index a2409a3f..7ba1d33d 100644 --- a/kubernetes/apps/monitoring/dashboards/heatpump-dhw-loading.json +++ b/kubernetes/apps/monitoring/dashboards/heatpump-dhw-loading.json @@ -29,14 +29,14 @@ { "refId": "A", "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "homeassistant_sensor_power_w{entity=\"sensor.vitocal_dhw_loading_power\"}", + "expr": "max by (entity) (homeassistant_sensor_power_w{entity=\"sensor.vitocal_dhw_loading_power\"})", "legendFormat": "Ladeleistung", "format": "time_series" }, { "refId": "B", "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.vitocal_250_a_vitocal_outside_temperature\"}", + "expr": "max by (entity) (homeassistant_sensor_temperature_celsius{entity=\"sensor.vitocal_250_a_vitocal_outside_temperature\"})", "legendFormat": "Aussentemp", "format": "time_series" } @@ -68,7 +68,7 @@ { "refId": "A", "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "homeassistant_sensor_power_w{entity=\"sensor.vitocal_dhw_loading_power\"}", + "expr": "max by (entity) (homeassistant_sensor_power_w{entity=\"sensor.vitocal_dhw_loading_power\"})", "legendFormat": "Ladeleistung" } ] @@ -94,7 +94,7 @@ { "refId": "A", "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "homeassistant_sensor_power_w{entity=\"sensor.vitocal_dhw_loading_power\"}", + "expr": "max by (entity) (homeassistant_sensor_power_w{entity=\"sensor.vitocal_dhw_loading_power\"})", "legendFormat": "Ladeleistung" } ] @@ -120,7 +120,7 @@ { "refId": "A", "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.vitocal_250_a_vitocal_outside_temperature\"}", + "expr": "max by (entity) (homeassistant_sensor_temperature_celsius{entity=\"sensor.vitocal_250_a_vitocal_outside_temperature\"})", "legendFormat": "Außentemp" } ]