I use a DTS353 kWh device with Modbus support. I had a lot of problems getting the device to work with home assistant, so I wanted to share my settings.
I use a https://www.victronenergy.com/accessories/rs485-to-usb-interface without termination.
Connection:
orange -> A -> 21
yellow -> B -> 20
Configuration.yaml:
modbus:
name: hub1
type: serial
method: rtu
port: /dev/ttyUSB1
baudrate: 9600
stopbits: 1
bytesize: 8
parity: E
timeout: 1
sensor:
- platform: modbus
scan_interval: 60 # not critical, is enough for me
registers:
- name: energy_auto
hub: hub1
unit_of_measurement: kWh
slave: 1
count: 2
register: 256
precision: 1
data_type: float
- name: power_auto
hub: hub1
unit_of_measurement: kW
slave: 1
count: 2
register: 28
precision: 1
data_type: float