Skip to content

Commit 7dcaf86

Browse files
authored
Provide channels icons/tags (openhab#16800)
Signed-off-by: Jacob Laursen <[email protected]>
1 parent a177e69 commit 7dcaf86

File tree

3 files changed

+38
-40
lines changed

3 files changed

+38
-40
lines changed

bundles/org.openhab.binding.denonmarantz/src/main/resources/OH-INF/i18n/denonmarantz.properties

+6-10
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ thing-type.config.denonmarantz.avr.zoneCount.description = Number of zones (incl
4141

4242
channel-group-type.denonmarantz.general.label = General Control
4343
channel-group-type.denonmarantz.general.description = General channels for this AVR.
44+
channel-group-type.denonmarantz.general.channel.power.description = Power ON/OFF the AVR
4445
channel-group-type.denonmarantz.zone.label = Zone Control
4546
channel-group-type.denonmarantz.zone.description = Channels for a zone of this AVR.
47+
channel-group-type.denonmarantz.zone.channel.mute.description = Mute audio on this zone of the AVR
48+
channel-group-type.denonmarantz.zone.channel.power.description = Power ON/OFF this zone of the AVR
49+
channel-group-type.denonmarantz.zone.channel.volume.description = Set the volume level of this zone
4650

4751
# channel types
4852

@@ -94,23 +98,15 @@ channel-type.denonmarantz.input.state.option.IPD = IPD
9498
channel-type.denonmarantz.input.state.option.IRP = IRP
9599
channel-type.denonmarantz.input.state.option.FVP = FVP
96100
channel-type.denonmarantz.input.state.option.OTP = OTP
101+
channel-type.denonmarantz.input.state.option.BLUETOOTH = BLUETOOTH
102+
channel-type.denonmarantz.input.state.option.COAXIAL = COAXIAL
97103
channel-type.denonmarantz.input.state.option.DIGITALIN1 = DIGITALIN1
98104
channel-type.denonmarantz.input.state.option.DIGITALIN2 = DIGITALIN2
99105
channel-type.denonmarantz.input.state.option.ANALOGIN = ANALOGIN
100106
channel-type.denonmarantz.input.state.option.ANALOGIN2 = ANALOGIN2
101-
channel-type.denonmarantz.input.state.option.BLUETOOTH = BLUETOOTH
102-
channel-type.denonmarantz.input.state.option.COAXIAL = COAXIAL
103-
channel-type.denonmarantz.mainPower.label = Power
104-
channel-type.denonmarantz.mainPower.description = Power ON/OFF the AVR
105-
channel-type.denonmarantz.mute.label = Mute
106-
channel-type.denonmarantz.mute.description = Enable/Disable Mute on this zone of the AVR
107107
channel-type.denonmarantz.surroundProgram.label = Surround Program
108108
channel-type.denonmarantz.surroundProgram.description = Select the surround program of the AVR
109109
channel-type.denonmarantz.track.label = Now Playing (track)
110110
channel-type.denonmarantz.track.description = Displays the title of the now playing track.
111-
channel-type.denonmarantz.volume.label = Volume
112-
channel-type.denonmarantz.volume.description = Set the volume level of this zone
113111
channel-type.denonmarantz.volumeDB.label = Volume (dB)
114112
channel-type.denonmarantz.volumeDB.description = Set the volume level (dB). Same as [mainVolume - 80].
115-
channel-type.denonmarantz.zonePower.label = Power (zone)
116-
channel-type.denonmarantz.zonePower.description = Power ON/OFF this zone of the AVR

bundles/org.openhab.binding.denonmarantz/src/main/resources/OH-INF/thing/thing-types.xml

+13-30
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</channel-groups>
3131

3232
<properties>
33-
<property name="thingTypeVersion">1</property>
33+
<property name="thingTypeVersion">2</property>
3434
</properties>
3535

3636
<representation-property>serialNumber</representation-property>
@@ -101,7 +101,9 @@
101101
<label>General Control</label>
102102
<description>General channels for this AVR.</description>
103103
<channels>
104-
<channel id="power" typeId="mainPower"/>
104+
<channel id="power" typeId="system.power">
105+
<description>Power ON/OFF the AVR</description>
106+
</channel>
105107
<channel id="surroundProgram" typeId="surroundProgram"/>
106108
<channel id="artist" typeId="artist"/>
107109
<channel id="album" typeId="album"/>
@@ -114,33 +116,20 @@
114116
<label>Zone Control</label>
115117
<description>Channels for a zone of this AVR.</description>
116118
<channels>
117-
<channel id="power" typeId="zonePower"/>
118-
<channel id="volume" typeId="volume"/>
119+
<channel id="power" typeId="system.power">
120+
<description>Power ON/OFF this zone of the AVR</description>
121+
</channel>
122+
<channel id="volume" typeId="system.volume">
123+
<description>Set the volume level of this zone</description>
124+
</channel>
119125
<channel id="volumeDB" typeId="volumeDB"/>
120-
<channel id="mute" typeId="mute"/>
126+
<channel id="mute" typeId="system.mute">
127+
<description>Mute audio on this zone of the AVR</description>
128+
</channel>
121129
<channel id="input" typeId="input"/>
122130
</channels>
123131
</channel-group-type>
124132

125-
<channel-type id="mainPower">
126-
<item-type>Switch</item-type>
127-
<label>Power</label>
128-
<description>Power ON/OFF the AVR</description>
129-
</channel-type>
130-
131-
<channel-type id="zonePower">
132-
<item-type>Switch</item-type>
133-
<label>Power (zone)</label>
134-
<description>Power ON/OFF this zone of the AVR</description>
135-
</channel-type>
136-
137-
<channel-type id="volume">
138-
<item-type>Dimmer</item-type>
139-
<label>Volume</label>
140-
<description>Set the volume level of this zone</description>
141-
<category>SoundVolume</category>
142-
</channel-type>
143-
144133
<channel-type id="volumeDB" advanced="true">
145134
<item-type unitHint="dB">Number:Dimensionless</item-type>
146135
<label>Volume (dB)</label>
@@ -149,12 +138,6 @@
149138
<state min="-80" max="18" step="0.5" pattern="%.1f %unit%"/>
150139
</channel-type>
151140

152-
<channel-type id="mute">
153-
<item-type>Switch</item-type>
154-
<label>Mute</label>
155-
<description>Enable/Disable Mute on this zone of the AVR</description>
156-
</channel-type>
157-
158141
<channel-type id="input">
159142
<item-type>String</item-type>
160143
<label>Input Source</label>

bundles/org.openhab.binding.denonmarantz/src/main/resources/OH-INF/update/instructions.xml

+19
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,25 @@
1111
</update-channel>
1212
</instruction-set>
1313

14+
<instruction-set targetVersion="2">
15+
<update-channel id="power" groupIds="general">
16+
<type>system:power</type>
17+
<description>Power ON/OFF the AVR</description>
18+
</update-channel>
19+
<update-channel id="power" groupIds="mainZone,zone2,zone3,zone4">
20+
<type>system:power</type>
21+
<description>Power ON/OFF this zone of the AVR</description>
22+
</update-channel>
23+
<update-channel id="volume" groupIds="mainZone,zone2,zone3,zone4">
24+
<type>system:volume</type>
25+
<description>Set the volume level of this zone</description>
26+
</update-channel>
27+
<update-channel id="mute" groupIds="mainZone,zone2,zone3,zone4">
28+
<type>system:mute</type>
29+
<description>Mute audio on this zone of the AVR</description>
30+
</update-channel>
31+
</instruction-set>
32+
1433
</thing-type>
1534

1635
</update:update-descriptions>

0 commit comments

Comments
 (0)