Adding additional sensors/support for battery inverter
Closed this issue · 1 comments
HartmutHartmann commented
Added the integration to HA yesterday, seems to work well so far.
Now I would like to add more sensors, for example to see dc power per string.
Additionally I do have a battery inverter which I would like to connect as well. The integration seems to connect initially, but reports 'Failed to set up' as soon as the inverter is added(didn't try logger yet). I also tried the 'test.py' which connects to both inverters just fine and reports correct data.
Unfortunately I have no experience writing Python or HA integrations. Any hints on which parts of the code need to be edited would be appreciated.
Edit: restarted Homeassistant, now the battery inverter seems to be fine, no more error...
eddso commented
sma_speedwire.py
: library to commulicate with SMA inverterCOMMAND_LIST
: extend with commands to read from inverter, check https://github.com/Rincewind76/SMAInverterself.sensors
: extend list of sensorsdef _fetch(self, command)
: extend parser to parser added command responses and fill self.sensorsdef update(self)
: call added command
sensor.py
: HA sensordef __init__(self, coordinator, device, sensor)
: extend wit your added sensors. Check here https://developers.home-assistant.io/docs/core/entity/sensor/
contact me, mb i can help you.