HABPanel Item Label Retrieval

Is there a function when writing a HABPanel widget to retrieve an item’s label.

Example Item (not real world):
Switch livingRoom_Fan “Living Room [%s]” {abunchofjunk}

I want to retrieve the label (Living Room ON) value from within a widget.

I have seen examples of this being retrieved by items in groups but never by an item defined in the settings of a widget.


<div ng-repeat="item in itemsInGroup(config.gLights)">

Ive tried a few things itemLabel(config.settingname) making the most sense but I can’t seem to find how to do this.


You can do this to see all the properties/values exposed by an object:

<div ng-repeat="item in itemsInGroup(config.gLights)">
{{item | json }}
1 Like

For me, this worked: -

1 Like