1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Allow modbus "scale" to be negative. (#109965)

This commit is contained in:
jan iversen
2024-02-08 12:40:32 +01:00
committed by GitHub
parent 168657b724
commit 55f10656a7
2 changed files with 11 additions and 1 deletions

View File

@@ -688,6 +688,16 @@ async def test_config_wrong_struct_sensor(
False,
"112594",
),
(
{
CONF_DATA_TYPE: DataType.INT16,
CONF_SCALE: -1,
CONF_OFFSET: 0,
},
[0x000A],
False,
"-10",
),
],
)
async def test_all_sensor(hass: HomeAssistant, mock_do_cycle, expected) -> None: