From cc180eaf583dc47528de16f8412db08dd160d8b6 Mon Sep 17 00:00:00 2001 From: Tomi Lehto Date: Sat, 10 Aug 2019 09:49:51 +0300 Subject: [PATCH] Update Modbus sensor docs for HA PR #25672 (#10043) Added note about possible floating point conversion related precision loss when dealing with large values and floating point scale and offset parameters. --- source/_components/sensor.modbus.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/_components/sensor.modbus.markdown b/source/_components/sensor.modbus.markdown index 5b2ee02cc8f..13378090288 100644 --- a/source/_components/sensor.modbus.markdown +++ b/source/_components/sensor.modbus.markdown @@ -111,6 +111,12 @@ registers: It's possible to change the default 30 seconds scan interval for the sensor updates as shown in the [Platform options](/docs/configuration/platform_options/#scan-interval) documentation. +
+ +If you specify scale or offset as floating point values, double precision floating point arithmetic will be used to calculate final value. This can cause loss of precision for values that are larger than 2^53. + +
+ ### Full example Example a temperature sensor with a 10 seconds scan interval: