[modbus] Add unit tests for U_WORD_S and S_WORD_S (#17831)

This commit is contained in:
Marek Pilch
2026-08-04 12:17:27 -04:00
committed by GitHub
parent 5abd100b53
commit 8bd9f213e5
5 changed files with 83 additions and 1 deletions
@@ -41,6 +41,13 @@ number:
return x * 2.0;
write_lambda: |-
return x / 2.0;
# Covers Python value-type maps + read/write path for byte-swapped words
- platform: modbus_controller
modbus_controller_id: modbus_controller1
id: modbus_number3
name: Test Number Swapped Word
address: 0x9003
value_type: U_WORD_S
output:
- platform: modbus_controller