I was working on my MySQL Persistence configuration and wondered if there is a possibility to exclude single Items.
I am currently persisting all my items and I would like to exclude only one.
You guys know something
Writing a persistence configuration with every item except this one item. (please no )
Thank you guys.
1.a Create a new group called
1.b Make all items and/or sub-Groups that you want to persist members of this new group (excluding the Items that you want)
1.c Persist the Group members (example:
gPersist* : strategy = everyChange, everyHour, everyDay)
I don’t think that there is a way to exclude a single item from the persistence configuration when you persist everything…
Will try that out, thank you.
I tested your solution. It works as expected. Thank you again
Shame there isnt an exclusion option in the persist config - it would almost always be the case that you have less items you want persisted than you do meaning that if you could exclude a group then you add the group tag to those, not the majority
This method (creating a group to specify persistence) works well - you can also use it to set up multiple persistence types, and target the item(s) you want to be persisted to the various types.
I’ve got mine set up for MapDB for everything (so I get the last known state, and for restoring on startup), then things like temperatures where I would like to know a history (for graphing) get persisted also to MySQL.
It’s a matter of point of view. It’s more about planning your groups around usage and persistence. Exclusion is not needed with good planning.