[modbus_controller] Fix wrong enum in function_code_to_register (#15253)

This commit is contained in:
Jonathan Swoboda
2026-03-27 19:55:57 -04:00
committed by GitHub
parent 34410e92b7
commit 47774fb644
@@ -362,7 +362,7 @@ async def register_modbus_device(var, config):
def function_code_to_register(function_code):
FUNCTION_CODE_TYPE_MAP = {
"read_coils": ModbusRegisterType.COIL,
"read_discrete_inputs": ModbusRegisterType.DISCRETE,
"read_discrete_inputs": ModbusRegisterType.DISCRETE_INPUT,
"read_holding_registers": ModbusRegisterType.HOLDING,
"read_input_registers": ModbusRegisterType.READ,
"write_single_coil": ModbusRegisterType.COIL,