iobroker-community-adapters / ioBroker.openhab

Connect ioBroker with openHAB
MIT License
13 stars 3 forks source link

Decimal type is parsed using parseInt instead of parseFloat #6

Closed Schluesselmeister closed 6 years ago

Schluesselmeister commented 6 years ago

The decimal type is converted using parseInt instead of parseFloat and therefore the number is truncated. This is around line 566 of main.js.

It should look like:

if (value.type === 'DecimalType' || value.type === 'Decimal') { value.value = parseFloat(value.value); } ...

GermanBluefox commented 6 years ago

Test https://github.com/ioBroker/ioBroker.openhab/commit/43b32fa707cc68a4c8ec533faf8ba9fbe4d26b8c

Schluesselmeister commented 6 years ago

Works as expected. Thanks.