I have started configuring my setup in openhab with Paper UI and then started to use text files *.items etc… as the main way to go.
I have now an hybrid situation wih half of my Xiaomi devices declared vi PaperUi and the other half managed directly from a xiaomi.items file. I like the second way much more and I’d like to move all my items currently not in the .items file to this file.
Is there a recommended way to do that? I need only this one shot but it means tens of items that I’d like to be able to recover in the file version witout breaking the names of the items etc… to keep the history nice and consistent.
I think your only choice is to remove the Item from PaperUI and then define it in .items files. Removing the Item will not delete that record in Persistence I don’t think (you might want to test that out to make sure).
If you are only talking about tens of Items it probably is not worth trying to write a script or the like. Just bite the bullet and do it.
Personally, I really like that they are automatically discovered so I mostly use PaperUI for Things. I have a few Things defined in .things files, mainly network binding Things, but that is held over from a time when PaperUI was not as capable as it is now.
Not all bindings yet support defining Things in .things files so that could be a problem if you did want to go the .things file route.