Skip to content

Commit fe89dd1

Browse files
authored
Add semantic tags (#18324)
Signed-off-by: Jacob Laursen <[email protected]>
1 parent bcff21d commit fe89dd1

File tree

3 files changed

+122
-53
lines changed

3 files changed

+122
-53
lines changed

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

+12-17
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,8 @@ channel-group-type.danfossairunit.humidity.label = Humidity
2525
channel-group-type.danfossairunit.humidity.channel.humidity.label = Humidity
2626
channel-group-type.danfossairunit.humidity.channel.humidity.description = Current relative humidity measured by the air unit
2727
channel-group-type.danfossairunit.main.label = Mode and Fan Speeds
28-
channel-group-type.danfossairunit.main.channel.boost.label = Boost
29-
channel-group-type.danfossairunit.main.channel.boost.description = Enables fan boost
30-
channel-group-type.danfossairunit.main.channel.night_cooling.label = Night Cooling
31-
channel-group-type.danfossairunit.main.channel.night_cooling.description = Enables night cooling
3228
channel-group-type.danfossairunit.recuperator.label = Recuperator
3329
channel-group-type.danfossairunit.recuperator.description = Heat exchaning device in the Air Unit
34-
channel-group-type.danfossairunit.recuperator.channel.bypass.label = Bypass
35-
channel-group-type.danfossairunit.recuperator.channel.bypass.description = Disables the heat exchange. Useful in summer when room temperature is above target and outside temperature is below target.
3630
channel-group-type.danfossairunit.recuperator.channel.exhaust_temp.label = Exhaust Air Temperature
3731
channel-group-type.danfossairunit.recuperator.channel.exhaust_temp.description = Temperature of the air when pushed outside
3832
channel-group-type.danfossairunit.recuperator.channel.extract_temp.label = Extract Air Temperature
@@ -42,18 +36,20 @@ channel-group-type.danfossairunit.recuperator.channel.supply_temp.description =
4236
channel-group-type.danfossairunit.service.label = Service
4337
channel-group-type.danfossairunit.service.channel.battery_life.label = Battery Life
4438
channel-group-type.danfossairunit.service.channel.battery_life.description = Remaining Air Dial Battery Level
45-
channel-group-type.danfossairunit.service.channel.filter_life.label = Remaining Filter Life
46-
channel-group-type.danfossairunit.service.channel.filter_life.description = Remaining life of filter until exchange is necessary
4739
channel-group-type.danfossairunit.temps.label = Temperatures
4840
channel-group-type.danfossairunit.temps.channel.outdoor_temp.label = Outdoor Temperature
4941
channel-group-type.danfossairunit.temps.channel.outdoor_temp.description = Temperature of the air outside
5042
channel-group-type.danfossairunit.temps.channel.room_temp.label = Room Temperature
5143
channel-group-type.danfossairunit.temps.channel.room_temp.description = Temperature of the air in the room of the Air Dial
52-
channel-group-type.danfossairunit.temps.channel.room_temp_calculated.label = Calculated Room Temperature
53-
channel-group-type.danfossairunit.temps.channel.room_temp_calculated.description = Calculated Room Temperature
5444

5545
# channel types
5646

47+
channel-type.danfossairunit.boost.label = Boost
48+
channel-type.danfossairunit.boost.description = Enables fan boost
49+
channel-type.danfossairunit.bypass.label = Bypass
50+
channel-type.danfossairunit.bypass.description = Disables the heat exchange. Useful in summer when room temperature is above target and outside temperature is below target
51+
channel-type.danfossairunit.calculated-temperature.label = Calculated Room Temperature
52+
channel-type.danfossairunit.calculated-temperature.description = Calculated Room Temperature
5753
channel-type.danfossairunit.currentTime.label = Current Time
5854
channel-type.danfossairunit.currentTime.description = Current time reported by the air unit
5955
channel-type.danfossairunit.defrost.label = Defrost
@@ -62,25 +58,24 @@ channel-type.danfossairunit.extractFanSpeed.label = Extract Fan Speed
6258
channel-type.danfossairunit.extractFanSpeed.description = Current rotation of the fan extracting air from the rooms
6359
channel-type.danfossairunit.extractFanStep.label = Extract Fan Step
6460
channel-type.danfossairunit.extractFanStep.description = Current step setting of the fan extracting air from the rooms
61+
channel-type.danfossairunit.filter-life.label = Remaining Filter Life
62+
channel-type.danfossairunit.filter-life.description = Remaining life of filter until exchange is necessary
6563
channel-type.danfossairunit.filterPeriod.label = Filter Period
6664
channel-type.danfossairunit.filterPeriod.description = Number of months between filter replacements
67-
channel-type.danfossairunit.manualFanStep.label = Manual Fan Step
68-
channel-type.danfossairunit.manualFanStep.description = Controls 10-step setting of the fan when operation mode is manual
65+
channel-type.danfossairunit.manual-fan-step.label = Manual Fan Step
66+
channel-type.danfossairunit.manual-fan-step.description = Controls 10-step setting of the fan when operation mode is manual
6967
channel-type.danfossairunit.mode.label = Mode
7068
channel-type.danfossairunit.mode.description = Operation mode of the air unit: Off, Demand, Manual, Program
7169
channel-type.danfossairunit.mode.state.option.DEMAND = Demand
7270
channel-type.danfossairunit.mode.state.option.PROGRAM = Program
7371
channel-type.danfossairunit.mode.state.option.MANUAL = Manual
7472
channel-type.danfossairunit.mode.state.option.OFF = Off
75-
channel-type.danfossairunit.percentage.label = Percentage
76-
channel-type.danfossairunit.percentage.description = Read only percentage
73+
channel-type.danfossairunit.night-cooling.label = Night Cooling
74+
channel-type.danfossairunit.night-cooling.description = Enables night cooling
7775
channel-type.danfossairunit.supplyFanSpeed.label = Supply Fan Speed
7876
channel-type.danfossairunit.supplyFanSpeed.description = Current rotation of the fan supplying air to the rooms
7977
channel-type.danfossairunit.supplyFanStep.label = Supply Fan Step
8078
channel-type.danfossairunit.supplyFanStep.description = Current step setting of the fan supplying air to the rooms
81-
channel-type.danfossairunit.switch.label = Something that can be turned on or off
82-
channel-type.danfossairunit.temperature.label = Temperature
83-
channel-type.danfossairunit.temperature.description = Current temperature
8479

8580
# discovery result
8681

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

+56-36
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<properties>
2121
<property name="vendor">Danfoss</property>
22-
<property name="thingTypeVersion">3</property>
22+
<property name="thingTypeVersion">4</property>
2323
</properties>
2424

2525
<representation-property>serialNumber</representation-property>
@@ -58,39 +58,32 @@
5858
<channels>
5959
<channel id="current_time" typeId="currentTime"/>
6060
<channel id="mode" typeId="mode"/>
61-
<channel id="manual_fan_step" typeId="manualFanStep"/>
61+
<channel id="manual_fan_step" typeId="manual-fan-step"/>
6262
<channel id="supply_fan_speed" typeId="supplyFanSpeed"/>
6363
<channel id="extract_fan_speed" typeId="extractFanSpeed"/>
6464
<channel id="supply_fan_step" typeId="supplyFanStep"/>
6565
<channel id="extract_fan_step" typeId="extractFanStep"/>
66-
<channel id="boost" typeId="switch">
67-
<label>Boost</label>
68-
<description>Enables fan boost</description>
69-
</channel>
70-
<channel id="night_cooling" typeId="switch">
71-
<label>Night Cooling</label>
72-
<description>Enables night cooling</description>
73-
</channel>
66+
<channel id="boost" typeId="boost"/>
67+
<channel id="night_cooling" typeId="night-cooling"/>
7468
</channels>
7569
</channel-group-type>
70+
7671
<channel-group-type id="temps">
7772
<label>Temperatures</label>
7873
<category>Temperature</category>
7974
<channels>
80-
<channel id="room_temp" typeId="temperature">
75+
<channel id="room_temp" typeId="system.indoor-temperature">
8176
<label>Room Temperature</label>
8277
<description>Temperature of the air in the room of the Air Dial</description>
8378
</channel>
84-
<channel id="room_temp_calculated" typeId="temperature">
85-
<label>Calculated Room Temperature</label>
86-
<description>Calculated Room Temperature</description>
87-
</channel>
79+
<channel id="room_temp_calculated" typeId="calculated-temperature"/>
8880
<channel id="outdoor_temp" typeId="system.outdoor-temperature">
8981
<label>Outdoor Temperature</label>
9082
<description>Temperature of the air outside</description>
9183
</channel>
9284
</channels>
9385
</channel-group-type>
86+
9487
<channel-group-type id="humidity">
9588
<label>Humidity</label>
9689
<channels>
@@ -100,41 +93,36 @@
10093
</channel>
10194
</channels>
10295
</channel-group-type>
96+
10397
<channel-group-type id="recuperator">
10498
<label>Recuperator</label>
10599
<description>Heat exchaning device in the Air Unit</description>
106100
<channels>
107-
<channel id="bypass" typeId="switch">
108-
<label>Bypass</label>
109-
<description>Disables the heat exchange. Useful in summer when room temperature is above target and outside
110-
temperature is below target.</description>
111-
</channel>
101+
<channel id="bypass" typeId="bypass"/>
112102
<channel id="defrost" typeId="defrost"/>
113-
<channel id="supply_temp" typeId="temperature">
103+
<channel id="supply_temp" typeId="system.indoor-temperature">
114104
<label>Supply Air Temperature</label>
115105
<description>Temperature of air which is passed to the rooms</description>
116106
</channel>
117-
<channel id="extract_temp" typeId="temperature">
107+
<channel id="extract_temp" typeId="system.indoor-temperature">
118108
<label>Extract Air Temperature</label>
119109
<description>Temperature of the air as extracted from the rooms</description>
120110
</channel>
121-
<channel id="exhaust_temp" typeId="temperature">
111+
<channel id="exhaust_temp" typeId="system.outdoor-temperature">
122112
<label>Exhaust Air Temperature</label>
123113
<description>Temperature of the air when pushed outside</description>
124114
</channel>
125115
</channels>
126116
</channel-group-type>
117+
127118
<channel-group-type id="service">
128119
<label>Service</label>
129120
<channels>
130121
<channel id="battery_life" typeId="system.battery-level">
131122
<label>Battery Life</label>
132123
<description>Remaining Air Dial Battery Level</description>
133124
</channel>
134-
<channel id="filter_life" typeId="percentage">
135-
<label>Remaining Filter Life</label>
136-
<description>Remaining life of filter until exchange is necessary</description>
137-
</channel>
125+
<channel id="filter_life" typeId="filter-life"/>
138126
<channel id="filter_period" typeId="filterPeriod"/>
139127
</channels>
140128
</channel-group-type>
@@ -147,10 +135,15 @@
147135
<category>Time</category>
148136
<state readOnly="true"/>
149137
</channel-type>
138+
150139
<channel-type id="mode">
151140
<item-type>String</item-type>
152141
<label>Mode</label>
153142
<description>Operation mode of the air unit: Off, Demand, Manual, Program</description>
143+
<tags>
144+
<tag>Control</tag>
145+
<tag>Mode</tag>
146+
</tags>
154147
<state>
155148
<options>
156149
<option value="DEMAND">Demand</option>
@@ -160,61 +153,88 @@
160153
</options>
161154
</state>
162155
</channel-type>
163-
<channel-type id="manualFanStep">
156+
157+
<channel-type id="manual-fan-step">
164158
<item-type>Dimmer</item-type>
165159
<label>Manual Fan Step</label>
166160
<description>Controls 10-step setting of the fan when operation mode is manual</description>
167161
<category>Fan</category>
162+
<tags>
163+
<tag>Control</tag>
164+
<tag>Level</tag>
165+
</tags>
168166
<state step="10" min="0" max="100"/>
169167
</channel-type>
168+
170169
<channel-type id="supplyFanSpeed">
171170
<item-type unitHint="rpm">Number:Frequency</item-type>
172171
<label>Supply Fan Speed</label>
173172
<description>Current rotation of the fan supplying air to the rooms</description>
174173
<category>Fan</category>
175174
<state pattern="%.0f rpm" readOnly="true" min="0"/>
176175
</channel-type>
176+
177177
<channel-type id="extractFanSpeed">
178178
<item-type unitHint="rpm">Number:Frequency</item-type>
179179
<label>Extract Fan Speed</label>
180180
<description>Current rotation of the fan extracting air from the rooms</description>
181181
<category>Fan</category>
182182
<state pattern="%.0f rpm" readOnly="true" min="0"/>
183183
</channel-type>
184+
184185
<channel-type id="supplyFanStep">
185186
<item-type>Dimmer</item-type>
186187
<label>Supply Fan Step</label>
187188
<description>Current step setting of the fan supplying air to the rooms</description>
188189
<category>Fan</category>
189190
<state step="10" min="0" max="100" readOnly="true"/>
190191
</channel-type>
192+
191193
<channel-type id="extractFanStep">
192194
<item-type>Dimmer</item-type>
193195
<label>Extract Fan Step</label>
194196
<description>Current step setting of the fan extracting air from the rooms</description>
195197
<category>Fan</category>
196198
<state step="10" min="0" max="100" readOnly="true"/>
197199
</channel-type>
200+
198201
<channel-type id="filterPeriod" advanced="true">
199202
<item-type>Number</item-type>
200203
<label>Filter Period</label>
201204
<description>Number of months between filter replacements</description>
202205
<state pattern="%d" min="3" max="12"/>
203206
</channel-type>
204-
<channel-type id="percentage">
207+
208+
<channel-type id="filter-life">
205209
<item-type>Number</item-type>
206-
<label>Percentage</label>
207-
<description>Read only percentage</description>
210+
<label>Remaining Filter Life</label>
211+
<description>Remaining life of filter until exchange is necessary</description>
208212
<state pattern="%.0f %%" readOnly="true" min="0" max="100"/>
209213
</channel-type>
210-
<channel-type id="switch">
214+
215+
<channel-type id="boost">
216+
<item-type>Switch</item-type>
217+
<label>Boost</label>
218+
<description>Enables fan boost</description>
219+
</channel-type>
220+
221+
<channel-type id="night-cooling">
222+
<item-type>Switch</item-type>
223+
<label>Night Cooling</label>
224+
<description>Enables night cooling</description>
225+
</channel-type>
226+
227+
<channel-type id="bypass">
211228
<item-type>Switch</item-type>
212-
<label>Something that can be turned on or off</label>
229+
<label>Bypass</label>
230+
<description>Disables the heat exchange. Useful in summer when room temperature is above target and outside
231+
temperature is below target</description>
213232
</channel-type>
214-
<channel-type id="temperature">
233+
234+
<channel-type id="calculated-temperature">
215235
<item-type>Number:Temperature</item-type>
216-
<label>Temperature</label>
217-
<description>Current temperature</description>
236+
<label>Calculated Room Temperature</label>
237+
<description>Calculated Room Temperature</description>
218238
<category>Temperature</category>
219239
<state readOnly="true" pattern="%.1f %unit%"/>
220240
</channel-type>

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

+54
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,60 @@
2525
</add-channel>
2626
</instruction-set>
2727

28+
<instruction-set targetVersion="4">
29+
<update-channel id="mode" groupIds="main">
30+
<type>danfossairunit:mode</type>
31+
</update-channel>
32+
33+
<update-channel id="manual_fan_step" groupIds="main">
34+
<type>danfossairunit:manual-fan-step</type>
35+
</update-channel>
36+
37+
<update-channel id="boost" groupIds="main">
38+
<type>danfossairunit:boost</type>
39+
</update-channel>
40+
41+
<update-channel id="night_cooling" groupIds="main">
42+
<type>danfossairunit:night-cooling</type>
43+
</update-channel>
44+
45+
<update-channel id="room_temp" groupIds="temps">
46+
<type>system:indoor-temperature</type>
47+
<label>Room Temperature</label>
48+
<description>Temperature of the air in the room of the Air Dial</description>
49+
</update-channel>
50+
51+
<update-channel id="room_temp_calculated" groupIds="temps">
52+
<type>danfossairunit:calculated-temperature</type>
53+
</update-channel>
54+
55+
<update-channel id="bypass" groupIds="recuperator">
56+
<type>danfossairunit:bypass</type>
57+
</update-channel>
58+
59+
<update-channel id="supply_temp" groupIds="recuperator">
60+
<type>system:indoor-temperature</type>
61+
<label>Supply Air Temperature</label>
62+
<description>Temperature of air which is passed to the rooms</description>
63+
</update-channel>
64+
65+
<update-channel id="extract_temp" groupIds="recuperator">
66+
<type>system:indoor-temperature</type>
67+
<label>Extract Air Temperature</label>
68+
<description>Temperature of the air as extracted from the rooms</description>
69+
</update-channel>
70+
71+
<update-channel id="exhaust_temp" groupIds="recuperator">
72+
<type>system:outdoor-temperature</type>
73+
<label>Exhaust Air Temperature</label>
74+
<description>Temperature of the air when pushed outside</description>
75+
</update-channel>
76+
77+
<update-channel id="filter_life" groupIds="service">
78+
<type>danfossairunit:filter-life</type>
79+
</update-channel>
80+
</instruction-set>
81+
2882
</thing-type>
2983

3084
</update:update-descriptions>

0 commit comments

Comments
 (0)