fix
This commit is contained in:
@@ -150,20 +150,20 @@ output:
|
||||
attribute: voltageL1
|
||||
name: Voltage L1
|
||||
unit: V
|
||||
register_type: input
|
||||
register_type: holding
|
||||
data_type: float32
|
||||
adaptor: floatAdaptor
|
||||
- address: 16
|
||||
attribute: voltageL2
|
||||
name: Voltage L2
|
||||
unit: V
|
||||
register_type: input
|
||||
register_type: holding
|
||||
data_type: float32
|
||||
adaptor: floatAdaptor
|
||||
- address: 18
|
||||
attribute: voltageL3
|
||||
name: Voltage L3
|
||||
unit: V
|
||||
register_type: input
|
||||
register_type: holding
|
||||
data_type: float32
|
||||
adaptor: floatAdaptor
|
||||
|
||||
@@ -51,6 +51,7 @@ class ModbusHandler:
|
||||
dataType = DATA_TYPES[data_type]
|
||||
count = dataType.value[1]
|
||||
|
||||
logger.debug(f"{self.client=}, {addr=}, {count=}, {slave=}")
|
||||
res = readFunc(self.client, addr, count=count, device_id=slave)
|
||||
if (isinstance(res, pymodbus.pdu.register_message.ReadHoldingRegistersResponse) or
|
||||
isinstance(res, pymodbus.pdu.register_message.ReadInputRegistersResponse) or
|
||||
|
||||
Reference in New Issue
Block a user