Impossibility to set the “actionAnalyzerItems” in items file.
Let me highlight another limitation of items files concerning setting metadata for widgets.
I noticed that the oh-label-list widget does not offer the possibility to “analyze” the time behavior of the item, differently than the oh-label-card. This behavior can be modified by editing with the UI the metadata “Default List Widget”, in particular by filling the fields action with the value “analyzer” and the field actionAnalyzerItems with the name of the item (Question: why doesn’t it default to the item to which this widget is applied?).
The YAML is as follows
value: ""
config:
action: analyzer
actionAnalyzerItems:
- Pres_Anna
With this manual modification of the configuration the widget expose the analyze button and everything works as I wish.
As I am wishing to apply this modification to a number of items, I am trying to set a metadata in the **items file **, following the informations in the OP, as follows
Switch Pres_Silvana "Pres Silvana [%s]" <presence> (gEquip_PresPD) ["Status","Presence"] {channel="xxx",
listWidget="oh-label-list"[action="analyzer",actionAnalyzerItems="Pres_Silvana" ]
}
but this item does not appear in the list of items under the equipment. If I remove the metadata it obviously reappears. The item is, in both cases visible from the settings pages (both in the model and the items pages) and it also shows that metadata are modified. Probably it is discarded, because the metadata are not correct. In fact, by looking closely to the code section in the UI, in order to inspect the YAML, it is as follows:
value: ""
config:
action: analyzer
actionAnalyzerItems: Pres_Silvana
The line actionAnalyzerItems
does not look the same as the one set manually. The same YAML appears also if I import from the UI with the option “import from .items file”.
When importing from the UI the YAML can be modified by inserting the missing newline, dash and indentation in order to make it look like the previous one. With this modification the item re-appears in the list under the equipment in the UI.