Skip to content

oh-aggregate-series: Load look-back timeframe for diff_last/diff_first aggregation functions#4264

Draft
florian-h05 wants to merge 3 commits into
openhab:mainfrom
florian-h05:oh-aggregate-series-first-nan
Draft

oh-aggregate-series: Load look-back timeframe for diff_last/diff_first aggregation functions#4264
florian-h05 wants to merge 3 commits into
openhab:mainfrom
florian-h05:oh-aggregate-series-first-nan

Conversation

@florian-h05

Copy link
Copy Markdown
Contributor

diff_last and diff_first aggregation functions need data from before the start time to calculate their first value.
Load this data from persistence to calculate the first aggregated value.
Also return NaN from diff_last instead of 0 when unable to calculate aggregated value.

Attempt to fix https://community.openhab.org/t/echart-problem-with-oh-aggregate-series/168922/23.

@florian-h05 florian-h05 added bug Something isn't working main ui Main UI labels Jun 7, 2026
@relativeci

relativeci Bot commented Jun 7, 2026

Copy link
Copy Markdown

#5932 Bundle Size — 13.88MiB (~+0.01%).

971efd6(current) vs b715a2b main#5926(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  no changes
                 Current
#5932
     Baseline
#5926
No change  Initial JS 1.47MiB 1.47MiB
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 843 843
No change  Assets 982 982
No change  Modules 2744 2744
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 122 122
No change  Duplicate Packages 1 1
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#5932
     Baseline
#5926
Regression  JS 11.57MiB (~+0.01%) 11.57MiB
No change  CSS 905.37KiB 905.37KiB
No change  IMG 638.41KiB 638.41KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  Other 847B 847B

Bundle analysis reportBranch florian-h05:oh-aggregate-series-...Project dashboard


Generated by RelativeCIDocumentationReport issue

@florian-h05 florian-h05 force-pushed the oh-aggregate-series-first-nan branch from 46fd1b5 to a9932bc Compare June 7, 2026 20:46
…ot calculate value due to missing data

Related to https://community.openhab.org/t/echart-problem-with-oh-aggregate-series/168922/23.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
…t/diff_first aggregation functions

These need data from a previous time block to calculate their first value.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
…t/diff_first aggregation functions

These need data from a previous time block to calculate their first value.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
@florian-h05 florian-h05 force-pushed the oh-aggregate-series-first-nan branch from a9932bc to 971efd6 Compare June 25, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working main ui Main UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant