From fd1b7001f6457d5633eaaa17602326e5d2ab8f8c Mon Sep 17 00:00:00 2001 From: Micha Date: Sun, 14 Jun 2026 11:08:58 +0200 Subject: [PATCH] fix: solar dashboard 30-day barchart and top-day table format - "Tages Produktion 30 Tage" auf barchart-Panel (timeseries-bars rendert spaerliche Tageswerte nicht); format table + xField time - "Erreichte TOP kWh": Subquery hat keine Zeitspalte -> format table statt time_series (behebt Panel-Fehler); Heute als skalare Query Co-Authored-By: Claude Fable 5 --- monitoring/grafana/dashboards/solar-pv.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/monitoring/grafana/dashboards/solar-pv.json b/monitoring/grafana/dashboards/solar-pv.json index 3b6b0a0..a07b2de 100644 --- a/monitoring/grafana/dashboards/solar-pv.json +++ b/monitoring/grafana/dashboards/solar-pv.json @@ -71,13 +71,13 @@ { "id": 5, "title": "Tages Produktion 30 Tage Übersicht", - "type": "timeseries", + "type": "barchart", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 11 }, "timeFrom": "30d", "datasource": { "type": "influxdb", "uid": "ha-weather-influx" }, - "fieldConfig": { "defaults": { "unit": "kwatth", "color": { "mode": "continuous-GrYlRd" }, "custom": { "drawStyle": "bars", "fillOpacity": 80, "lineWidth": 1, "gradientMode": "scheme" } }, "overrides": [] }, - "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, - "targets": [ { "refId": "A", "datasource": { "type": "influxdb", "uid": "ha-weather-influx" }, "rawQuery": true, "format": "time_series", "rawSql": "SELECT date_bin(INTERVAL '1 day', time) AS time, max(value) AS value FROM \"kWh\" WHERE entity_id = 'solaredge_pv_energy_today' AND $__timeFilter(time) GROUP BY 1 ORDER BY 1" } ] + "fieldConfig": { "defaults": { "unit": "kwatth", "color": { "mode": "continuous-GrYlRd" }, "custom": { "fillOpacity": 80, "gradientMode": "scheme", "lineWidth": 1 } }, "overrides": [] }, + "options": { "orientation": "vertical", "showValue": "never", "xField": "time", "legend": { "showLegend": false }, "tooltip": { "mode": "single" } }, + "targets": [ { "refId": "A", "datasource": { "type": "influxdb", "uid": "ha-weather-influx" }, "rawQuery": true, "format": "table", "rawSql": "SELECT date_bin(INTERVAL '1 day', time) AS time, max(value) AS value FROM \"kWh\" WHERE entity_id = 'solaredge_pv_energy_today' AND $__timeFilter(time) GROUP BY 1 ORDER BY 1" } ] }, { "id": 6, @@ -104,8 +104,8 @@ }, "options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "displayMode": "lcd", "orientation": "horizontal", "showUnfilled": true }, "targets": [ - { "refId": "A", "datasource": { "type": "influxdb", "uid": "ha-weather-influx" }, "rawQuery": true, "format": "time_series", "rawSql": "SELECT max(d) AS value FROM (SELECT date_bin(INTERVAL '1 day', time) AS day, max(value) AS d FROM \"kWh\" WHERE entity_id = 'solaredge_pv_energy_today' AND time > now() - INTERVAL '365 days' GROUP BY 1)" }, - { "refId": "B", "datasource": { "type": "influxdb", "uid": "ha-weather-influx" }, "rawQuery": true, "format": "time_series", "rawSql": "SELECT time, value FROM \"kWh\" WHERE entity_id = 'solaredge_pv_energy_today' AND $__timeFilter(time) ORDER BY time" } + { "refId": "A", "datasource": { "type": "influxdb", "uid": "ha-weather-influx" }, "rawQuery": true, "format": "table", "rawSql": "SELECT max(d) AS value FROM (SELECT date_bin(INTERVAL '1 day', time) AS day, max(value) AS d FROM \"kWh\" WHERE entity_id = 'solaredge_pv_energy_today' AND time > now() - INTERVAL '365 days' GROUP BY 1)" }, + { "refId": "B", "datasource": { "type": "influxdb", "uid": "ha-weather-influx" }, "rawQuery": true, "format": "table", "rawSql": "SELECT value FROM \"kWh\" WHERE entity_id = 'solaredge_pv_energy_today' ORDER BY time DESC LIMIT 1" } ] }, {