How to insert a remark in things script?

Hi,
I create certain documentation in Openhab 2.5 directly in the Things file.
How can I do that in Openhab 3.0?

image

You can‘t !

Very sad :frowning:

Well, you can in .things files. There was some exploration to look for ways that allow the insertion of comments into the YAML in MainUI but it’s just not feasible.

The YAML you see is translated back and forth between JSON in the browser. JSON doesn’t really support comments like that. You could potentially add comments as separate fields in the YAML/JSON but then it will break the JSONDB schemas. The changes just ripple out too far and even when implemented produce a suboptimal solution.

Unless and until this tricky problem can be solved comments won’t be possible in the UI YAML. But it didn’t work in PaperUI either and if you are happy with your .things files, why move off of them? Comments still work there.

Since I have read that one should say goodbye to files slowly, I have made the effort to create all directly in openhab.

Maybe in the future there is a note field in the things.

While I personally advocate to move to the UI where possible, I have never written (or at least never meant) that one should mode to the UI. There are advantages for sure, especially with Things that can be auto-discovered, but text config files will forever be supported. I just can’t imagine them ever being dropped. Too many use them.

Hi Rich,
Okayyy.
But since I already created a lot of Things in the UI I will not switch back to files.
That was very tedious and is also not as clear as in the files.

Thanks for your important info!

1 Like