faanskit / ha-esolar

Custom Integration of SAJ eSOLAR
https://github.com/faanskit/ha-checkwatt
GNU General Public License v3.0
6 stars 4 forks source link

Feature request - have the battery percentage on the inverter level #4

Closed RobbieDemaegdt closed 1 year ago

RobbieDemaegdt commented 1 year ago

Hello, Now we have the overal battery percentage of all the inverters on the plant level. Would it be possible to also have the battery percentage on the interver level as well because the value on the plant level is an average of all the inverter battery percentages. Just having that as attribute on the interverter power sensor would be good.

faanskit commented 1 year ago

class ESolarInverterBatterySoC(ESolarSensor): is an inverter level sensor, and it provides the following data:

if self.inverter_sn == kit["devicesn"] and kit["onLineStr"] == "1":
   value = float(kit["storeDevicePower"]["batEnergyPercent"])

It is named like this self._attr_unique_id = f"Battery_SOC_{inverter_sn}"

Is this implementation incorrect? Does it not give inverter level percentage?

I've noticed before that some sensors does not automatically show in the UI. If you cannot find Battery_SOC_{inverter_sn}, please check for it under .../config/entities or .../config/integrations

I have limited bandwidth for this, but if you can point out which data (from which request) that should go into a specific attribute I may be able to fix it.

/Marcus

RobbieDemaegdt commented 1 year ago

I have installed the integration on my production HA and reloaded it and now the percentages are available. So skip this remark, probably a reload issue with HA and the integration.