Skip to content

Commit f8377bb

Browse files
authored
[fineoffsetweatherstation] Add unitHints (#21452)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
1 parent aa33a37 commit f8377bb

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

  • bundles/org.openhab.binding.fineoffsetweatherstation

bundles/org.openhab.binding.fineoffsetweatherstation/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -370,21 +370,21 @@ Switch BatteryStatusWH65 "Low Battery WH65" <LowBattery> (WH65) ["Energy", "LowB
370370
Group gOutdoor "Outdoor" ["Location"]
371371
Number:Temperature weather_temperature_outdoor "Outdoor Temperature" <Temperature> (gOutdoor) ["Measurement", "Temperature"] { channel="fineoffsetweatherstation:gateway:3906700515:temperature-outdoor" }
372372
Number:Temperature weather_temperature_indoor "Inside temperature" <Temperature> ["Measurement", "Temperature"] { channel="fineoffsetweatherstation:gateway:3906700515:temperature-indoor" }
373-
Number:Dimensionless weather_humidity_indoor "Humidity inside" <Humidity> ["Measurement", "Humidity"] { channel="fineoffsetweatherstation:gateway:3906700515:humidity-indoor" }
374-
Number:Pressure weather_pressure_absolute "Absolute pressure" <Pressure> (gOutdoor) ["Measurement", "Pressure"] { channel="fineoffsetweatherstation:gateway:3906700515:pressure-absolute" }
375-
Number:Pressure weather_pressure_relative "Relative pressure" <Pressure> (gOutdoor) ["Measurement", "Pressure"] { channel="fineoffsetweatherstation:gateway:3906700515:pressure-relative" }
376-
Number:Dimensionless weather_humidity_outdoor "Humidity outside" <Humidity> (gOutdoor) ["Measurement", "Humidity"] { channel="fineoffsetweatherstation:gateway:3906700515:humidity-outdoor" }
373+
Number:Dimensionless weather_humidity_indoor "Humidity inside" <Humidity> ["Measurement", "Humidity"] { unit="%", channel="fineoffsetweatherstation:gateway:3906700515:humidity-indoor" }
374+
Number:Pressure weather_pressure_absolute "Absolute pressure" <Pressure> (gOutdoor) ["Measurement", "Pressure"] { unit="hPa", channel="fineoffsetweatherstation:gateway:3906700515:pressure-absolute" }
375+
Number:Pressure weather_pressure_relative "Relative pressure" <Pressure> (gOutdoor) ["Measurement", "Pressure"] { unit="hPa", channel="fineoffsetweatherstation:gateway:3906700515:pressure-relative" }
376+
Number:Dimensionless weather_humidity_outdoor "Humidity outside" <Humidity> (gOutdoor) ["Measurement", "Humidity"] { unit="%", channel="fineoffsetweatherstation:gateway:3906700515:humidity-outdoor" }
377377
Number:Angle weather_direction_wind "Wind direction" <Wind> (gOutdoor) ["Measurement", "Wind"] { channel="fineoffsetweatherstation:gateway:3906700515:direction-wind" }
378378
Number:Speed weather_speed_wind "Wind speed" <Wind> (gOutdoor) ["Measurement", "Wind"] { channel="fineoffsetweatherstation:gateway:3906700515:speed-wind" }
379379
Number:Speed weather_speed_gust "Gust speed" <Wind> (gOutdoor) ["Measurement", "Wind"] { channel="fineoffsetweatherstation:gateway:3906700515:speed-gust" }
380380
Number:Illuminance weather_illumination "Light intensity" <Sun> (gOutdoor) ["Measurement", "Light"] { channel="fineoffsetweatherstation:gateway:3906700515:illumination" }
381-
Number:Intensity weather_irradiation_uv "UV radiation" <Sun> (gOutdoor) ["Measurement", "Light"] { channel="fineoffsetweatherstation:gateway:3906700515:irradiation-uv" }
381+
Number:Intensity weather_irradiation_uv "UV radiation" <Sun> (gOutdoor) ["Measurement", "Light"] { unit="mW/m²", channel="fineoffsetweatherstation:gateway:3906700515:irradiation-uv" }
382382
Number:Dimensionless weather_uv_index "UV Index" <Sun> (gOutdoor) ["Measurement", "Light"] { channel="fineoffsetweatherstation:gateway:3906700515:uv-index" }
383383
Number:Speed weather_max_day "Maximum wind speed today" <Wind> (gOutdoor) ["Measurement", "Wind"] { channel="fineoffsetweatherstation:gateway:3906700515:wind-max-day" }
384-
Number:Speed weather_rain_rate "Rainfall rate" <Rain> (gOutdoor) ["Measurement", "Rain"] { channel="fineoffsetweatherstation:gateway:3906700515:rain-rate" }
385-
Number:Length weather_rain_day "Rainfall today" <Rain> (gOutdoor) ["Measurement", "Rain"] { channel="fineoffsetweatherstation:gateway:3906700515:rain-day" }
386-
Number:Length weather_rain_week "Rainfall this week" <Rain> (gOutdoor) ["Measurement", "Rain"] { channel="fineoffsetweatherstation:gateway:3906700515:rain-week" }
387-
Number:Length weather_rain_month "Rainfall this month" <Rain> (gOutdoor) ["Measurement", "Rain"] { channel="fineoffsetweatherstation:gateway:3906700515:rain-month" }
388-
Number:Length weather_rain_year "Rainfall this year " <Rain> (gOutdoor) ["Measurement", "Rain"] { channel="fineoffsetweatherstation:gateway:3906700515:rain-year" }
389-
Number:Length weather_rain_event "Amount of rainfall at the last rain" <Rain> (gOutdoor) ["Measurement", "Rain"] { channel="fineoffsetweatherstation:gateway:3906700515:rain-event" }
384+
Number:Speed weather_rain_rate "Rainfall rate" <Rain> (gOutdoor) ["Measurement", "Rain"] { unit="mm/h", channel="fineoffsetweatherstation:gateway:3906700515:rain-rate" }
385+
Number:Length weather_rain_day "Rainfall today" <Rain> (gOutdoor) ["Measurement", "Rain"] { unit="mm", channel="fineoffsetweatherstation:gateway:3906700515:rain-day" }
386+
Number:Length weather_rain_week "Rainfall this week" <Rain> (gOutdoor) ["Measurement", "Rain"] { unit="mm", channel="fineoffsetweatherstation:gateway:3906700515:rain-week" }
387+
Number:Length weather_rain_month "Rainfall this month" <Rain> (gOutdoor) ["Measurement", "Rain"] { unit="mm", channel="fineoffsetweatherstation:gateway:3906700515:rain-month" }
388+
Number:Length weather_rain_year "Rainfall this year " <Rain> (gOutdoor) ["Measurement", "Rain"] { unit="mm", channel="fineoffsetweatherstation:gateway:3906700515:rain-year" }
389+
Number:Length weather_rain_event "Amount of rainfall at the last rain" <Rain> (gOutdoor) ["Measurement", "Rain"] { unit="mm", channel="fineoffsetweatherstation:gateway:3906700515:rain-event" }
390390
```

bundles/org.openhab.binding.fineoffsetweatherstation/src/main/resources/OH-INF/thing/gateway.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</channel-type>
3737

3838
<channel-type id="rain">
39-
<item-type>Number:Length</item-type>
39+
<item-type unitHint="mm,in">Number:Length</item-type>
4040
<label>Rain</label>
4141
<category>Rain</category>
4242
<tags>
@@ -47,7 +47,7 @@
4747
</channel-type>
4848

4949
<channel-type id="pressure">
50-
<item-type>Number:Pressure</item-type>
50+
<item-type unitHint="hPa,inHg">Number:Pressure</item-type>
5151
<label>Pressure</label>
5252
<category>Pressure</category>
5353
<tags>
@@ -69,7 +69,7 @@
6969
</channel-type>
7070

7171
<channel-type id="moisture">
72-
<item-type>Number:Dimensionless</item-type>
72+
<item-type unitHint="%">Number:Dimensionless</item-type>
7373
<label>Moisture</label>
7474
<category>Moisture</category>
7575
<tags>
@@ -91,7 +91,7 @@
9191
</channel-type>
9292

9393
<channel-type id="uv-radiation">
94-
<item-type>Number:Intensity</item-type>
94+
<item-type unitHint="mW/m²">Number:Intensity</item-type>
9595
<label>UV-Irradiation</label>
9696
<category>Sun</category>
9797
<tags>
@@ -113,7 +113,7 @@
113113
</channel-type>
114114

115115
<channel-type id="rain-rate">
116-
<item-type>Number:Speed</item-type>
116+
<item-type unitHint="mm/h,in/h">Number:Speed</item-type>
117117
<label>Rain Rate</label>
118118
<category>Rain</category>
119119
<tags>
@@ -124,7 +124,7 @@
124124
</channel-type>
125125

126126
<channel-type id="pm25">
127-
<item-type>Number:Density</item-type>
127+
<item-type unitHint="µg/m³">Number:Density</item-type>
128128
<label>PM2.5 Air Quality</label>
129129
<category>AirQuality</category>
130130
<tags>
@@ -135,7 +135,7 @@
135135
</channel-type>
136136

137137
<channel-type id="pm10">
138-
<item-type>Number:Density</item-type>
138+
<item-type unitHint="µg/m³">Number:Density</item-type>
139139
<label>PM10 Air Quality</label>
140140
<category>AirQuality</category>
141141
<tags>
@@ -146,7 +146,7 @@
146146
</channel-type>
147147

148148
<channel-type id="pm4">
149-
<item-type>Number:Density</item-type>
149+
<item-type unitHint="µg/m³">Number:Density</item-type>
150150
<label>PM4 Air Quality</label>
151151
<category>AirQuality</category>
152152
<tags>
@@ -158,7 +158,7 @@
158158

159159

160160
<channel-type id="pm1">
161-
<item-type>Number:Density</item-type>
161+
<item-type unitHint="µg/m³">Number:Density</item-type>
162162
<label>PM1 Air Quality</label>
163163
<category>AirQuality</category>
164164
<tags>
@@ -169,7 +169,7 @@
169169
</channel-type>
170170

171171
<channel-type id="co2">
172-
<item-type>Number:Dimensionless</item-type>
172+
<item-type unitHint="ppm">Number:Dimensionless</item-type>
173173
<label>CO₂</label>
174174
<description>Air Quality Indicator</description>
175175
<category>CarbonDioxide</category>
@@ -205,7 +205,7 @@
205205
</channel-type>
206206

207207
<channel-type id="lightning-distance">
208-
<item-type>Number:Length</item-type>
208+
<item-type unitHint="km,mi">Number:Length</item-type>
209209
<label>Lightning Distance</label>
210210
<state pattern="%.0f %unit%" readOnly="true"/>
211211
</channel-type>
@@ -240,7 +240,7 @@
240240
</channel-type>
241241

242242
<channel-type id="vapor-pressure-deficit">
243-
<item-type>Number:Pressure</item-type>
243+
<item-type unitHint="kPa">Number:Pressure</item-type>
244244
<label>Vapor Pressure Deficit</label>
245245
<description>The difference between the amount of moisture in the air and how much moisture the air can hold when
246246
saturated</description>

0 commit comments

Comments
 (0)