I like to show a custom icon added to /etc/openhab2/icons/classic. For that I configured my item definition with category “mycan”. Is it possible to retrieve the item category in a custom tag like the item value (itemValue), so I do not need to hard code the icon name?
If I well undestand you may want to include the icon name in the widget configuration, isnt it?
If so, just replace ‘myscan’ with config.icon_name and include icon_name in the configuration widget.
Thank you for pointing to the rest API that was exactly the information I was looking for! It shows you all the possibilities you have to access items in template or custom widgets.