I understand, I can confirm that:
- if you add the custom widget as the “default list item widget” in the metadata of the Item,
the correct properties of the custom widget appear and can be edited
- if you then and add the Item (Add from model…) to a list on a page, the output of the page is showing the item title, icon, state properly properly and does not disappear from the page in visual editing mode.
However, there is still major caveats (which are not the “fault” of the widget of course, but due to current OH3 general architecture flaws (IMHO):
- Once it has been added to the page, the custom widget cannot be (visually) edited anymore (you cannot edit the widget properties, but only the settings of the underlying oh-list-item (same as above)
- If you edit the Metadata of the item and change some of the widget properties (e.g. the battery name), this does not get updated on the page.
This means that basically, you can’t change the widget configuration, the only way is to remove it from the page and add it again (very annoying). The same is neccessary of course if you e.g. add another property to the widget later on. Only changes within the widget are propagated to all instances where it is being used.