Skip to content

Add history retention mode - #3401

Merged
Salvialf merged 6 commits into
developfrom
feat/history-retention-mode
Jun 29, 2026
Merged

Add history retention mode#3401
Salvialf merged 6 commits into
developfrom
feat/history-retention-mode

Conversation

@Salvialf

@Salvialf Salvialf commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a new historyRetentionMode configuration per numeric info command (the only subtype for which smoothing options are available)
  • When active, forces historizeMode to none and history::smooth to disabled to prevent conflicts with real-time smoothing
  • The corresponding fields are hidden in the UI when a retention mode is selected
image

Retention options

Option Use case
Last value of the day Commands updated frequently where only the end-of-day value matters: daily energy index, gas or water meter, daily rainfall accumulation, real-time price or tariff
First and last value of the day Cumulative counters where the daily delta matters (last - first): electricity, gas or water index to calculate daily consumption
Last value of the month Commands representing a consolidated monthly state: peak power demand, monthly usage total, subscription consumption counter
First and last value of the month Same as above but where the monthly delta is needed, typically for billing-period index readings

Notes

  • Retention is applied in real time on each call to addHistoryValue, before the value is saved
  • When retention is set back to none, historizeMode and history::smooth are restored to their last saved values if they were not previously overridden by a retention save. Otherwise they reset to their defaults (avg and empty)
  • Documentation update required in docs/fr_FR/display.md: add historyRetentionMode field description under the history section of the info command configuration tab

@Salvialf Salvialf added the changelog-feat Use to generate release notes / changelog. To be apply on PR. Use it only for core feature label Jun 27, 2026
@Salvialf Salvialf changed the title Feat/history retention mode Add history retention mode Jun 27, 2026
@MrWaloo

MrWaloo commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

My 2 cents: instead of "Aucun" for retention mode, the text should be "Toutes les valeurs" or something like this.
Setting the retention mode to "None" (aucun) could make the user think, there is no retention at all... Or it should be called "retention limitation mode", then "None" would make sense.

@Mips2648 Mips2648 added this to the 5.0 milestone Jun 28, 2026
@Salvialf

Salvialf commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Hi @MrWaloo,

Thanks for raising this, "Aucun" was indeed ambiguous in this context. Changed to "Normal" to clearly convey that the default behavior applies (no limitation). The field label "Mode de rétention" stays as is since it accurately describes the feature when a non-default option is selected.

@Salvialf
Salvialf merged commit df11154 into develop Jun 29, 2026
9 checks passed
@Salvialf
Salvialf deleted the feat/history-retention-mode branch June 29, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-feat Use to generate release notes / changelog. To be apply on PR. Use it only for core feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants