slipx06 / Sunsynk-Home-Assistant-Dash

Home Assistant Dashboard to display Inverter information. ESPHome configuration to collect inverter sensor data via modbus
66 stars 18 forks source link

Serial number not displaying correctly #13

Closed ameran closed 2 months ago

ameran commented 2 months ago

Hi,

When copying the code to create an entity for serial number, when I use this code:

mine only displays a single registers value. Its like its not combining the registers, is there something I'm doing wrong?

slipx06 commented 2 months ago

@ameran thanks for reporting. I was missing the response_size when reading the registers. See updated code below

  - platform: modbus_controller            # 003-007 Inverter HEX Serial Number
    modbus_controller_id: inverter
    id: inverter_esphome_serial
    register_type: holding
    skip_updates: ${settings_skipped_updates}
    raw_encode: HEXBYTES
    address: 003
    register_count: 5
    response_size: 9
    internal: true
ameran commented 2 months ago

Awesome! It's working perfectly!

ameran commented 2 months ago

Quick note, this line should be: response_size: 10 that one then matches whats on the display.

slipx06 commented 2 months ago

Thanks also realized this.