MODBUS data from SMA Inverter

I think I have the solution. I just tried this out with my Sunny Tripower STB 6000TL-20

With slave ID 3 I get the right results with one addition to the sensor definition: register_type: input
Without it I get no data.

here my two snippets:

modbus:
  name: sma
  type: tcp
  host: 192.168.178.101
  port: 502


sensors:
  - platform: modbus
    scan_interval: 30
    registers:
      - name: Gesamtertrag
        hub: sma
        unit_of_measurement: kWh
        slave: 3
        register: 30531
        register_type: input
        count: 2