Correct data_type and structure for modbus telegram on a smart meter

Hello.

I have these telegrams from a modbus smart meter:

imagem

The one I’m aiming to obtain on my Home Assistant has the intex 0x79 (Active Power). On those samples its numerical value is zero at that moment.

I know that its data_type is a “double long unsigned” (4 bytes), as stated in the device docs:

But with this config, the sensor always get the state “unavailable”:

sensor:
  - platform: modbus
    scan_interval: 2
    registers:    
      - name: "Active power"
        hub: 1
        slave: 1
        # 0x79
        register: 121
        register_type: input
        unit_of_measurement: 'W'
        count: 2
        reverse_order: false
        scale: 1
        offset: 0
        precision: 1
        # double long unsigned
        data_type: uint

I have other modbus sensors for this slave device working flawlessly, such as voltage and current.

From the modbus sensor documentation, is possible to set a custom data_type and its structure. Can anyone help on this, please?

Thanks.

I updated the yaml above, with no success either.

Hi.
I have the same problem. Did you find the solution?
thanks

4 bytes fix