Different label for same type channels


As I’m working on an AirZone binding, I have declared the following channel type in the XML definition file:

<channel-type id="stage" advanced="true">
	<state min="1" max="3" />

That channel type is meant to be used for the “heat stage” and the “cold stage” that are available on each zone, so I have declared the channels like this:

<channel id="heatStage" typeId="stage" />
<channel id="coldStage" typeId="stage" />

While this works fine, it has an annoying effect in that both channels have the same label in the GUI, making them hard to differentiate:


I could not find a clear definition of what’s acceptable in the XML in the channels definition, so is there a way to give a different label to two channels using the same type?
Sure, I could duplicate the type definition, but it doesn’t feel right.

Both channels are mapped to the same channel-type id, therefore you get the same label. You will need different channel types.

I should have read the XML document better, there is an XSD import at the top:

xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd"

And looking in that XSD file, we see the following:

<xs:complexType name="channel">
    <xs:element name="label" type="xs:string" minOccurs="0"/>
    <xs:element name="description" type="xs:string" minOccurs="0"/>
    <xs:element name="properties" type="thing-description:properties" minOccurs="0"/>
    <xs:element name="autoUpdatePolicy" type="thing-description:auto-update-policy" minOccurs="0"/>
  <xs:attribute name="id" type="config-description:idRestrictionPattern" use="required"/>
  <xs:attribute name="typeId" type="thing-description:namespaceIdRestrictionPattern" use="required"/>

So the id and typeId attributes are required but one should be able to specify child elements among which the label one looks promising.
So I left the default label on the channel type definition but I modified my channel declarations like this:

<channel id="heatStage" typeId="stage">
<channel id="coldStage" typeId="stage">

And sure enough, the default label is overwritten by that label definition:


So the conclusion is that it is possible, just that I need to refresh my XSD reading skills.