mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 22:25:13 +02:00
Modbus, allow received int to be a float. (#110648)
This commit is contained in:
committed by
Franck Nijhof
parent
e5db7278e1
commit
6f529a2c77
@@ -199,6 +199,8 @@ class BaseStructPlatform(BasePlatform, RestoreEntity):
|
||||
self._precision = config.get(CONF_PRECISION, 2)
|
||||
else:
|
||||
self._precision = config.get(CONF_PRECISION, 0)
|
||||
if self._precision > 0 or self._scale != int(self._scale):
|
||||
self._value_is_int = False
|
||||
|
||||
def _swap_registers(self, registers: list[int], slave_count: int) -> list[int]:
|
||||
"""Do swap as needed."""
|
||||
|
Reference in New Issue
Block a user