mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
fix decimal values being truncated (#10989)
This commit is contained in:
parent
4cf8b1a5ab
commit
8c6c97e237
@ -119,8 +119,7 @@ public class EcoTouchHandler extends BaseThingHandler {
|
||||
QuantityType<?> value = (QuantityType<?>) command;
|
||||
QuantityType<?> rawUnit = value.toUnit(ecoTouchTag.getUnit());
|
||||
if (rawUnit != null) {
|
||||
int raw = rawUnit.intValue();
|
||||
raw *= ecoTouchTag.getDivisor();
|
||||
int raw = (int) (rawUnit.doubleValue() * ecoTouchTag.getDivisor());
|
||||
localConnector.setValue(ecoTouchTag.getTagName(), raw);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user