Hey all - hoping someone can help a newbie figure out how to get a value from my flow meter.
I have managed to get the flow rate into HA, but I can't figure out how to get the accumulator total.
Here is the original sensor section (below) in ESPHome, and the MODBUS info from the meter at the bottom. I have currently deleted the second sensor (Positive_Accumulator) and the value I see on the meter console for flow rate (flowmeter at address 0x1) is the same one I see in the HA sensor. ![]()
I had tried changing the value_type for Positive_Accumulator from FP32 to U_DWORD after I noticed that the MODBUS shows LONG as the format. I thought I would at least get the integer portion of the Net Accumulator, but I just get random(?) numbers. Same thing when I changed the register to 0x19. Can anyone point me in the right direction? I thought I might have to add the LONG value to the decimal fraction from the next register, but that is beyond me...
sensor:
- platform: modbus_controller
modbus_controller_id: tuf2000m
name: flowmeter
id: flow
register_type: holding
address: 0x1
register_count: 2
response_size: 2
accuracy_decimals: 3
value_type: FP32
unit_of_measurement: m³/h
- platform: modbus_controller
modbus_controller_id: tuf2000m
name: Positive_Accumulator
register_type: holding
address: 0x9
register_count: 2
value_type: FP32
device_class: water
state_class: measurement
unit_of_measurement: m³
