Hi,
the current query (in grafana.ifdb.json, about line 850) gives negative values at start of each day, it can be addressed with a trick:
"query": "SELECT ((difference(max(\"SolarProduction_Today\")) + abs(difference(max(\"SolarProduction_Today\")))) / 2) FROM \"InverterData\" WHERE $timeFilter GROUP BY time(30m) fill(null)",
The trick just gets the absolute value and adds it to the first value, so it zeroes the negatives, then it divides by 2 to get the original positive values again.
Hi, the current query (in grafana.ifdb.json, about line 850) gives negative values at start of each day, it can be addressed with a trick:
"query": "SELECT ((difference(max(\"SolarProduction_Today\")) + abs(difference(max(\"SolarProduction_Today\")))) / 2) FROM \"InverterData\" WHERE $timeFilter GROUP BY time(30m) fill(null)",
The trick just gets the absolute value and adds it to the first value, so it zeroes the negatives, then it divides by 2 to get the original positive values again.
HTH Pere