[fineoffsetweatherstation] fix conversion of pressure (#13139)
resolves #13127 Signed-off-by: Andreas Berger <andreas@berger-freelancer.com>
This commit is contained in:
parent
49a82c284e
commit
7920dd6d48
|
@ -72,7 +72,7 @@ public enum MeasureType {
|
|||
|
||||
PERCENTAGE(PERCENT, 1, CHANNEL_TYPE_HUMIDITY, (data, offset) -> toUInt8(data[offset])),
|
||||
|
||||
PRESSURE(HECTO(PASCAL), 2, CHANNEL_TYPE_PRESSURE, Utils::toUInt16),
|
||||
PRESSURE(HECTO(PASCAL), 2, CHANNEL_TYPE_PRESSURE, (data, offset) -> toUInt16(data, offset) / 10.),
|
||||
|
||||
DEGREE(DEGREE_ANGLE, 2, null, Utils::toUInt16),
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class FineOffsetDataParserTest {
|
|||
Assertions.assertThat(data)
|
||||
.extracting(MeasuredValue::getChannelId, measuredValue -> measuredValue.getState().toString())
|
||||
.containsExactly(new Tuple("temperature-indoor", "21.1 °C"), new Tuple("humidity-indoor", "40 %"),
|
||||
new Tuple("pressure-absolute", "10223 hPa"), new Tuple("pressure-relative", "10223 hPa"),
|
||||
new Tuple("pressure-absolute", "1022.3 hPa"), new Tuple("pressure-relative", "1022.3 hPa"),
|
||||
new Tuple("temperature-outdoor", "6.9 °C"), new Tuple("humidity-outdoor", "79 %"),
|
||||
new Tuple("direction-wind", "21 °"), new Tuple("speed-wind", "0 m/s"),
|
||||
new Tuple("speed-gust", "0 m/s"), new Tuple("illumination", "0 lx"),
|
||||
|
|
Loading…
Reference in New Issue