Modbus wrong readout

I have two identical ND meters. When I Read holding register 515. One of them reads correctly, but the other gives me an odd negative value.

I’ve checked the direct reading from the ND device, and this shows correctly, but not in HA. Any ideas why. The Register 515 on device 40007 works fine, 40008 gives weird value.

Any Hints?

Skærmbillede 2023-08-18 kl. 10.48.27

Skærmbillede 2023-08-18 kl. 10.49.03

modbus:
  - name: "40007"
    type: tcp
    host: 172.16.32.7
    port: 502
    sensors:
      - name: 40007_Power_All_Total
        slave: 1
        address: 2816
        input_type: holding
        unit_of_measurement: kWh
        device_class: power
        state_class: measurement
        count: 1
        scale: 0.1
        offset: 0
        scan_interval: 3
      - name: 40007_Power_P1_Total
        slave: 1
        address: 2823
        input_type: holding
        unit_of_measurement: kWh
        device_class: power
        state_class: measurement
        count: 1
        scale: 0.1
        offset: 0
        scan_interval: 3
      - name: 40007_Power_P2_Total
        slave: 1
        address: 2826
        input_type: holding
        unit_of_measurement: kWh
        device_class: power
        state_class: measurement
        count: 1
        scale: 0.1
        offset: 0
        scan_interval: 3
      - name: 40007_Power_P3_Total
        slave: 1
        address: 2829
        input_type: holding
        unit_of_measurement: kWh
        device_class: power
        state_class: measurement
        count: 1
        scale: 0.1
        offset: 0
        scan_interval: 3
      - name: 40007_515_Total_kWh
        slave: 1
        address: 515
        input_type: holding
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        scan_interval: 3
      - name: 40007_514_Total_kWh
        slave: 1
        address: 514
        input_type: holding
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        scan_interval: 3
      - name: 40007_Export_Total_kWh
        slave: 1
        address: 525
        input_type: holding
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        scan_interval: 3
  - name: "40008"
    type: tcp
    host: 172.16.32.8
    port: 502
    sensors:
      - name: 40008_Power_All_Total
        slave: 1
        address: 2816
        input_type: holding
        unit_of_measurement: kWh
        device_class: power
        state_class: measurement
        count: 1
        scale: 0.1
        offset: 0
        scan_interval: 3
      - name: 40008_Power_P1_Total
        slave: 1
        address: 2823
        input_type: holding
        unit_of_measurement: kWh
        device_class: power
        state_class: measurement
        count: 1
        scale: 0.1
        offset: 0
        scan_interval: 3
      - name: 40008_Power_P2_Total
        slave: 1
        address: 2826
        input_type: holding
        unit_of_measurement: kWh
        device_class: power
        state_class: measurement
        count: 1
        scale: 0.1
        offset: 0
        scan_interval: 3
      - name: 40008_515_Total_kWh_TEST
        slave: 1
        address: 515
        input_type: holding
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        scan_interval: 3
      - name: 40008_514_Total_kWh
        slave: 1
        address: 514
        input_type: holding
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        scan_interval: 3
      - name: 40008_Export_Total_kWh
        slave: 1
        address: 525
        input_type: holding
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        scan_interval: 3

Since the 18, the value of the Register has increased, and now Ha shows -9500, this is consistant with the increased value from modbus register. So it seems like it reads the value correct, but count’s from a wierd set point. Tried setting the state to 0, tried clearing the statistics. But with no luck at all.

Any ideas ?