I’m experimenting with YAML file-based widgets (placed in conf/yaml/, with a version: 1 key and a widgets: map, as described in the YAML Configuration docs). I have a few questions about how these behave in Main UI:
Lock icon: widgets loaded this way show up in Developer Tools > Widgets with a small lock icon next to them. I assume this indicates they’re read-only / externally managed (i.e. coming from a file, not the managed/GUI store) - can someone confirm this is indeed what the lock means?
Removing them: how do I remove a file-based widget that I no longer want? Deleting it from the widget list in the GUI doesn’t seem to work (presumably because it’s read-only/externally managed). Delete the YAML file doesn’t remove it from the GUI within Main UI?
Inconsistent visibility: some of my file-based widgets show up fine in the Widgets list, but others - defined the exact same way, in the same conf/yaml/ folder - don’t appear at all, even after a full restart of the openHAB container. The log does show Adding YAML model yaml/<filename>.yaml for all of them at startup, so they do seem to load without errors, they just don’t all show up in the picker. Has anyone run into this, and is there a known cause (e.g. a caching issue, a naming conflict, or something specific to how/when the file was added)?
Any pointers appreciated - trying to understand the intended workflow here, since I’d like to manage a small personal widget library entirely through files (for version control) rather than through the GUI editor.
@HenMus if you could try refreshing your browser window and then take a screenshot of the page whilst confirming what’s inside conf/yaml that’d be helpful.
Also note that yaml files are also loaded from conf/items, conf/things, conf/tags. Also both *.yaml and *.yml are loaded.
You were right — I re-tested and see now that a single YAML file containing multiple widgets under one widgets: key does show up correctly, with each widget appearing as a separate entry in the Widgets list (identified by its UID, not by filename). Delete the file and all of them disappear together. So no ghost widgets — that was my misreading of the earlier screenshots. Thanks for the patience.
New finding on pages though:
I ran into something with pages that I can’t fully explain. My energiepagina_compleet.yaml file loads without errors in the log, but the page does not appear in the sidebar. I had originally given it a readable UID:
uid: page_energie_bestand
When I replaced that UID with a GUI-style auto-generated one:
uid: page_1bc8ca20f2
…the page suddenly shows up in the sidebar and renders fine (screenshot attached — the widgets are empty because the referenced items don’t exist in this test, but the layout is there).
Is there a naming convention or specific pattern that page UIDs must follow to be picked up by the sidebar? It looks like only UIDs matching the auto-generated page_ + hex pattern are recognized, but I couldn’t find this documented anywhere. Or is this a bug?
Is working. The issue occurred because an f7-card requires internal wrapper structures (such as f7-card-content) to properly display list elements, causing only the outer frame to render when wrapping a separate oh-list.
Switching to oh-list-card resolves this, as it natively combines the card container with list functionality, allowing the list items to render directly.