In the menu Developer Tools i have these functions (OH 5.0.1):
Items File Definitions - Copy all Items’ file defintions to clipboard
Add items from DSL Definition - Create or update items & links in bulk
The function “Add items from DSL Definition” was always good for bulk item creation.
But the syntax is not complete identical with the .item files. The value format had to go in the stateDescription and not in the label.
The new OH5 function “Items File Definitions” can copy all item definitions in DSL and YAML format. But none of these two formats are compatible with function “Add items from DSL Definition”.
So, I can bulk export items and but not reuse them with the UI. Where is the place to import them?
Full support for import/export is not yet implemented.
No support for import from YAML is implemented.
That’s the goal but we are far from that goal and it is actively being worked.
Right now, when you get “File Definitions” you get what is expected and appropriate for a file based Item. If you’ve only defined a state description pattern, that pattern will be applied in the Item’s label. However, if you have other state description stuff defined, it will be added as stateDescription metadata.
The import from DSL needs some updates. The lexical analyzer has not kept up with some of the changes to the Item’s DSL syntax and it marks things as errors that are not errors. But I suspect any major improvements or fixes will wait for completion of the YAML syntax and a true import/export feature.
For now, you’ll have to deal with the Item label and stateDescription discrepancies manually. Though it might be worth it for you to file an issue on openhab-webui to improve the Add Items from DSL page to support some of the things that are broken (e.g. non-string Item metadata values) and perhaps to handle the label/state description discrepancies.