springfall2008 / batpred

Home battery prediction and charging automation for Home Assistant, supporting many inverter types
https://springfall2008.github.io/batpred/
128 stars 44 forks source link

SolarEdge - Battery Full at X % (97%) #1542

Open Noodleyman opened 3 weeks ago

Noodleyman commented 3 weeks ago

Is your feature request related to a problem? Please describe. with SolarEdge systems, if a battery has 97, 98 99 or 100% state of charge then the system will consider the battery full. If asked to charge when at 98% for example, the system will not charge the remaining 2%. This can cause Predbat to get a little confused if it wants to charge the last 2% but it never achieves it. Instead, it will keep the system in charge mode which in short means the system will just be running off grid. Thus, it would be nice to make the "fully charge" state a configurable value. "Consider battery full at X %" in this case 97%.

Describe the solution you'd like Add a new configurable entity to define at what SoC the battery is considered full, and not a candidate for charging. in this case for SE systems, if the battery is at 97% or higher don't try and charge the last 3%.

Describe alternatives you've considered Considered using an automation to set discharge mode to lower battery to 96% or lower, if at 97-100% when predbat.status is Charging, but this seems wasteful to cycle power in this way and is not yet implemented

Additional context None

raldred commented 2 days ago

I have a similar thing with my LuxPower inverter, it never reaches 100%, I made a template sensor to correct the battery SOC which I use with batpred.

Use in place of the sensor you configure for soc_percent within your apps.yaml

Here's my example, you can create something similar for your system

sensor.lux_battery is the current battery SOC (%) sensor.lux_bms_limit_charge_live is the BMS charge limit, which will be zero once the BMS has decided the battery is full and stops it charging (you may have to utilise another mechanism to determine it's full here)

So I basically have the condition, if BMS charge limit is 0 and the SOC is above 97 then it's considered 100%

{% set soc = states('sensor.lux_battery')|int %}
{% set charging_stopped = states('sensor.lux_bms_limit_charge_live')|float == 0 %}

{% if charging_stopped and soc > 97 %}
  100
{% else %}
  {{ soc }}
{% endif %}
gcoan commented 1 day ago

You could also try inverter_rate_maximum in apps.yaml https://springfall2008.github.io/batpred/apps-yaml/#inverter-reserve-maximum