How to change widgets on several items

Dear all!

In my environment (that I migrated to OH3), I have around 1600 items.
I imported the items from a files based approach (that I had in OH2) via the item UI.
Semantic Model is also in place and working fine (thanks to your support :slight_smile: )
Somehow I need to get it under control now :wink:

First I would like to use the default tab view as a start (locations, equipment, properties). This view is using the default widgets defined. Is there a way to change the existing items via a mass change (e.g. via the semantic model, e.g. changing from a slider item to a stepper etc.).
Even though I looked through tons of documentation, I could only find a way on how to do this. Maybe this is written somewhere and I am not able to grab it. Apologies for this.

Thanks a lot for your support in advance!

Best regards,

Sort of but not really. You can define custom list widgets (under developer tools, see Example Custom List Widgets for some examples). But you’ll have to go to each Item and set the “Default List Widget” to use that custom widget you created.

The good news is once that is done, any changes you make to the custom widget will automatically be applied to all the Items that use it. But you can’t “bulk” apply it to a bunch of Items in one go.

You might find it faster to use the REST API Docs. You can create one example Item through the UI, query for the JSON, edit it to apply to a new Item and submit it. Repeat for each Item. That would be faster than clicking through MainUI for each Item.

Of course, with that many Items it might also be worth scripting that process instead of even using the REST API.

Though I wouldn’t expect all of those 1600 Items to be in the model.

Understood. I’ll find a way.
Thanks a lot, Rich!