Its probably too late by now but your problem is you are missing the data type on your modbus sensor. Basically Home assistant reads the ET112 number as INT16 (-32768 up to 32768) and the ET112 is presenting a UINT16 number (0 up to 65536). So every time you hit the upper number Home assistant wraps the number to the extreme negative and counts back to 0.
- name: victron_direct_usb
type: serial
method: rtu
port: /dev/ttyUSB0
baudrate: 9600
stopbits: 1
bytesize: 8
parity: N
sensors:
- name: Victron - Grid Import RAW
scan_interval: 10
unit_of_measurement: "kWh"
slave: 2
address: 274
data_type: uint16
- name: Victron - Grid Current RAW
scan_interval: 10
unit_of_measurement: "A AC"
slave: 2
address: 256
data_type: int32
swap: byte