Access item category in custom widget

See here: HABPanel Development & Advanced Features: Start Here!

  • getItem(itemname): retrieves the complete structure of the item as formatted by openHAB’s /rest/items API;

The structure in question is documented here: http://demo.openhab.org:8080/doc/index.html#!/items/getItemData (or your own instance if you installed the REST API documentation bundle)

Therefore this expression will likely work: getItem('Your_Item').category

Tip: you can use for instance <div>{{getItem('Your_Item') | json}}</div> to have a look at the whole JSON object.