-
- Downloads
Fix 64-bit modbus sensor register reads (#25672)
* Fix 64-bit modbus sensor register reads When reading four 16-bit modbus registers as a sensor value, slave output is stored first as 64-bit integer, but before returning that value is converted to double precision floating point. This causes rounding errors for integer values bigger than 2^53. After this change floating point conversion is done only if user has configured scaling or offset using floating points. * Formatting * Review fixes
Showing
- homeassistant/components/modbus/sensor.py 30 additions, 5 deletionshomeassistant/components/modbus/sensor.py
- tests/components/modbus/__init__.py 1 addition, 0 deletionstests/components/modbus/__init__.py
- tests/components/modbus/test_modbus_sensor.py 361 additions, 0 deletionstests/components/modbus/test_modbus_sensor.py
tests/components/modbus/__init__.py
0 → 100644
Please register or sign in to comment