mirror of
https://github.com/esphome/esphome.git
synced 2026-05-28 13:37:24 +08:00
[modbus_controller] Fix wrong enum in function_code_to_register (#15253)
This commit is contained in:
@@ -362,7 +362,7 @@ async def register_modbus_device(var, config):
|
|||||||
def function_code_to_register(function_code):
|
def function_code_to_register(function_code):
|
||||||
FUNCTION_CODE_TYPE_MAP = {
|
FUNCTION_CODE_TYPE_MAP = {
|
||||||
"read_coils": ModbusRegisterType.COIL,
|
"read_coils": ModbusRegisterType.COIL,
|
||||||
"read_discrete_inputs": ModbusRegisterType.DISCRETE,
|
"read_discrete_inputs": ModbusRegisterType.DISCRETE_INPUT,
|
||||||
"read_holding_registers": ModbusRegisterType.HOLDING,
|
"read_holding_registers": ModbusRegisterType.HOLDING,
|
||||||
"read_input_registers": ModbusRegisterType.READ,
|
"read_input_registers": ModbusRegisterType.READ,
|
||||||
"write_single_coil": ModbusRegisterType.COIL,
|
"write_single_coil": ModbusRegisterType.COIL,
|
||||||
|
|||||||
Reference in New Issue
Block a user