Echart problem with oh-aggregate-series

@florian-h05

Not sure this is another small bug…

oh-aggregate-series smallest timeblock to display is 1h → that’s why I created 2 influx “measurements” = series for testing purposes:

  • measurement 1: Sampling 1 minute
  • measurement 2: Sampling 1 hour

aggregationFunction: diff_last for both series.

I wanted to be sure Sampling 1h is sufficient (it should be) and would lead to exactly the same bars, irrespective whether charttype is “year”, “month”, “week” or “day”.

The good news are that the bars seem to match EXCEPT for the very first timeblock being the first hour of the period to aggregate.

Sampling 1h leads to value 0 in hour 0. (IS THIS A BUG?)

There is definitely data prior to hour 0 to which the aggregationFunction: diff_last can be applied to.

That missing value impacts “week” and “month” on the FIRST DAY displayed.

In type “year” the month of January would also be impacted, however, that missing hour is not visible.

The 0.7 kWh that are missing in hour 0 (upper chart) seem to be the difference on day 1 with 21 vs. 20 kWh (lower chart9).

edit:
The timestamp for hour 0 is exactly at 00:00:00. diff_last should then use value from prev timestamp that would be 23:00:00.

> SELECT * FROM "energy_meter_home_total_1h" WHERE time >= '2026-05-11T23:30:00Z' AND time < '2026-05-12T00:30:00Z'
name: energy_meter_home_total_1h
time                 value
----                 -----
2026-05-12T00:00:00Z 36486.84939