mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[enocean] fix temperature values for D2_50 eep (#16975)
Fixes #16974 Signed-off-by: Zhivka Dimova <zhivka.dimova@myforest.net>
This commit is contained in:
parent
a5a02a17f0
commit
35add30e0c
@ -144,19 +144,20 @@ public class D2_50 extends _VLDMessage {
|
||||
case CHANNEL_AIRQUALITYVALUE2:
|
||||
return new QuantityType<>((bytes[4] & 0x7f), Units.PERCENT);
|
||||
case CHANNEL_OUTDOORAIRTEMPERATURE:
|
||||
return new QuantityType<>(-63 + (bytes[5] >>> 1), SIUnits.CELSIUS);
|
||||
return new QuantityType<>(-63 + ((bytes[5] & 0xff) >>> 1), SIUnits.CELSIUS);
|
||||
case CHANNEL_SUPPLYAIRTEMPERATURE:
|
||||
return new QuantityType<>(-63 + (bytes[6] >>> 2) + ((bytes[5] & 1) << 6), SIUnits.CELSIUS);
|
||||
return new QuantityType<>(-63 + ((bytes[6] & 0xff) >>> 2) + ((bytes[5] & 1) << 6), SIUnits.CELSIUS);
|
||||
case CHANNEL_INDOORAIRTEMPERATURE:
|
||||
return new QuantityType<>(-63 + (bytes[7] >>> 3) + ((bytes[6] & 0b11) << 5), SIUnits.CELSIUS);
|
||||
return new QuantityType<>(-63 + ((bytes[7] & 0xff) >>> 3) + ((bytes[6] & 0b11) << 5), SIUnits.CELSIUS);
|
||||
case CHANNEL_EXHAUSTAIRTEMPERATURE:
|
||||
return new QuantityType<>(-63 + (bytes[8] >>> 4) + ((bytes[7] & 0b111) << 4), SIUnits.CELSIUS);
|
||||
return new QuantityType<>(-63 + ((bytes[8] & 0xff) >>> 4) + ((bytes[7] & 0b111) << 4), SIUnits.CELSIUS);
|
||||
case CHANNEL_SUPPLYAIRFANAIRFLOWRATE:
|
||||
return new QuantityType<>((bytes[9] >>> 2) + ((bytes[8] & 0b1111) << 6), Units.CUBICMETRE_PER_MINUTE);
|
||||
return new QuantityType<>(((bytes[9] & 0xff) >>> 2) + ((bytes[8] & 0b1111) << 6),
|
||||
Units.CUBICMETRE_PER_MINUTE);
|
||||
case CHANNEL_EXHAUSTAIRFANAIRFLOWRATE:
|
||||
return new QuantityType<>((bytes[10] & 0xff) + ((bytes[9] & 0b11) << 8), Units.CUBICMETRE_PER_MINUTE);
|
||||
case CHANNEL_SUPPLYFANSPEED:
|
||||
return new DecimalType((bytes[12] >>> 4) + (bytes[11] << 4));
|
||||
return new DecimalType(((bytes[12] & 0xff) >>> 4) + (bytes[11] << 4));
|
||||
case CHANNEL_EXHAUSTFANSPEED:
|
||||
return new DecimalType((bytes[13] & 0xff) + ((bytes[12] & 0b1111) << 8));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user