From 34984d78a1ea2efe1a2f43b50aa77943054e791c Mon Sep 17 00:00:00 2001 From: jan iversen Date: Sat, 16 Oct 2021 01:06:36 +0200 Subject: [PATCH] Add float32 test to modbus (#57805) --- tests/components/modbus/test_sensor.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/components/modbus/test_sensor.py b/tests/components/modbus/test_sensor.py index 6bc4a352d93..4f631b279c1 100644 --- a/tests/components/modbus/test_sensor.py +++ b/tests/components/modbus/test_sensor.py @@ -541,6 +541,17 @@ async def test_config_wrong_struct_sensor(hass, error_message, mock_modbus, capl False, str(int(0x04030201)), ), + ( + { + CONF_COUNT: 2, + CONF_INPUT_TYPE: CALL_TYPE_REGISTER_INPUT, + CONF_DATA_TYPE: DataType.FLOAT32, + CONF_PRECISION: 2, + }, + [16286, 1617], + False, + "1.23", + ), ], ) async def test_all_sensor(hass, mock_do_cycle, expected):