Skip to content

Persistence DSL validation - #5775

Open
mherwege wants to merge 1 commit into
openhab:mainfrom
mherwege:persistence_check
Open

Persistence DSL validation#5775
mherwege wants to merge 1 commit into
openhab:mainfrom
mherwege:persistence_check

Conversation

@mherwege

Copy link
Copy Markdown
Contributor

Closes openhab/openhab-addons#21351

When using a filter or strategy in a persistence configuration, that filter or strategy needs to be defined in the Filters or Strategies section (except for globally defined strategies).
Failure to do so did not generate a parse exception, only manifested itself when trying to use the filter or strategy. This caused NPE's, because the name of the filter or strategy would be null in the half parsed object.

This validation makes sure filters and strategies are properly defined and rejects loading the persist file if not.
It also checks for duplicate filter or strategy names, also so far not caught at parse time and potentially leading to unexpected behaviour.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
@lsiepel

lsiepel commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Does this only apply to xtend, no other file based configuration (yaml)?

@mherwege

Copy link
Copy Markdown
Contributor Author

Does this only apply to xtend, no other file based configuration (yaml)?

There is no yaml configuration for persistence yet. The UI configuration should not be impacted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[influxdb] OH5.2 persist with rest API gives error 500, also when using rules

2 participants