A popular solar equipment company is Victron Energy and currently it integrates with Home Assistant through modbus interface.
Would be great to be able to use the sensors and measurements from Victron in the new Energy dashboard, but that is not posisble as the modbus sensors cannot have the state_class attribute to them, which makes them invisible for the Energy dashboard configuration.
Assuming this is all what would be needed in order to expose such sensors to the Energy dashboard, can this attribute be added for modbus sensors? Or to create a platform “solar” for modbus… maybe?
Sample configuration which can be done now, but not usable in Energy dashboard:
modbus:
- type: tcp
name: victron
host: 192.168.xx.xxx
port: 502
# Victron Energy Venus GX Solar Power data
sensors:
- name: Grid power
unit_of_measurement: "W"
slave: 100
address: 820
device_class: power
- name: Power consumption
unit_of_measurement: "W"
slave: 100
address: 817
device_class: power
Hey @raresv
Have you managed to get anywhere with this? I use Victron Multiplus II (with battery bank) and a fronius primo inverter. I also get all the info into HA but I can not figure my way through getting the sensors to show up in the energy dashboard.
Unfortunately I am no pro at HA…
You can configure eg. state_class: "total_increasing" in the Modbus sensor yaml config with next release (2021.9 - currently in beta). It will be selectable then.
Remember, contrary to the initial post here, you need energy values (Wh), not power (W).
Also you can just use the Fronius integration to get your inverters data into HA. It will be compatible with the energy tab out of the box.
Thanks for the tip on the Fronius but I was kind of hoping that as all the Fronius data gets put through the Victron Modbus, I would just use that but its an option.
Thanks
No, you could use customize but imho you are leaving non-HA-expert territory then. I’d rather go install beta 2021.9 if you can’t wait until Wednesday.
You’d also have to revert this again after doing the update then.
Just trying it out now. I used to pull mostly the power metrics, not energy… so now I need to pull those also. But it seems to work. Will update here when i get it reasonably working, but the fact we can now (with the september udpate) set the state_class on modbus sensors… is great
Thanks for this.
I tried this and I can’t use the sensors because they are “unavailable” - when I check the reason for this - they do not have a unique id. Did you encounter this problem and how did you get around it?
Do you have this error only with the two energy sensors or with all of them? Seems rather to be an issue with your Modbus config in general then the two sensors. Unique entity_id’s are created by the integration and can’t be influenced.