- Platform information:
- Hardware: amd64/16G RAL
- OS: Manjaro Linux
- Java Runtime Environment: OpenJDK 17
- openHAB version: 4.1.1
Hello,
In order to be able to access my weather forceast items states in the future, I added a persistence configuration of type forecast
on the group where all the items are placed.
This worked just fine, I’m now able to get the forecast values from any JS rule so that’s fine.
But this has had an unexpected consequence:
All other items are no longer persisted!
This really surprised me as the default strategies configuration still is everyChange
and yet, I had to add another configuration that applies to ‘*’ with everyChange
as its strategy.
And because MainUI won’t let me select “all items”, I had to go to the code tab and discovered the joys of escaping the star character.
Anyway, I now have the following configuration:
And this is the associated code:
configurations:
- items:
- weather_forecast*
strategies:
- forecast
filters: []
- items:
- "*"
strategies:
- everyChange
filters: []
cronStrategies:
- name: everyMinute
cronExpression: 0 * * ? * *
- name: everyHour
cronExpression: 0 0 * * * ?
- name: everyDay
cronExpression: 0 0 0 * * ?
defaultStrategies:
- everyChange
thresholdFilters: []
timeFilters: []
equalsFilters: []
includeFilters: []
Maybe this is totally expected but as it caught me by surprise, I’m writing this message to warn others facing the same situation.