Got you! I have changed W to Wh, however, nothing show up again, do I need to restert HA?


UPDATE:
Ok so what you need to do in order for the thing to work: make sure you have Energy kWh measurement in your system, I have it in configuration file.
If you have Power, which is instant measurements, you can change it to kWh, which mend that if you use instant data 1 hr and devide it to 1000 you will have kWh:
- name: Pgrid
address: 25214
scan_interval: 10
slave: 4
input_type: holding
scale: 0.001
offset: 0
unit_of_measurement: "kWh"
precision: 1
device_class: energy
Then you should go to Configuration tab → Customization and find your device there and add state class: measurement:
Hit SAVE, check again your configuration files and restart HA!
And you still get nothing )))
Below two devices, one is MQTT and it works, other MODBUS and it doesn’t!
unit_of_measurement: kWh
friendly_name: Pgrid
device_class: energy
state_class: measurement
state_class: measurement
unit_of_measurement: kWh
friendly_name: Washing_Machine ENERGY Total
device_class: energy