Battery charge/discharge curves require soc_kw and can't accept soc_percent
Describe the bug Originally identified by @brickatius in https://github.com/springfall2008/batpred/issues/2184#issuecomment-2775400589
LuxPower inverter provides soc as a percentage, which predbat will accept for planning, but the battery charge/discharge function requires soc_kw (via a custom template sensor)
Expected behaviour For consistency and expansion to other inverters, battery charge/discharge curves should accept soc either in kw or percentage
Predbat version 8.17
Environment details Luxpower
What do you mean by 'function' do you mean the service API?
This may be related to issue/enhancement 2026 that I raised for the same thing but to do with charge_rate_percent and discharge_rate_percent not being able to be used for charge/discharge curve prediction.
I'd actually already hit the soc_kw vs. soc_percent problem, but had worked around it by creating a template sensor. I think at the time I didn't know how to do template sensors for charge/discharge_rate_percent, assuming they were "outputs" from Predbat, as opposed to just a sensor.
Just want to tack on to this comment btw - thank you so much for all your efforts in creating and maintaining this project. Everyone I've shown Predbat's plan to and explained how it works is seriously impressed, and despite my wife having spent a couple of months being very sceptical about "the predator" being in control of our battery, she's definitely come around having seen it automatically signing up to Octopus saving sessions, exporting excess energy at key times, etc.
battery charge/discharge function
Sorry very loose words here @springfall2008
I meant to refer to the predbat routine that automatically creates charge/discharge curves. At the moment it needs soc_kw for this, which not all inverters have (eg luxpower).
Proposed the curves could be created with soc_percent
battery charge/discharge function
Sorry very loose words here @springfall2008
I meant to refer to the predbat routine that automatically creates charge/discharge curves. At the moment it needs soc_kw for this, which not all inverters have (eg luxpower).
Proposed the curves could be created with soc_percent
Ah yes this could be possible
Hi, adding to this topic: it seems the charge/discharge curve generation is also not possible for Solis inverters due to the missing soc_kw sensor but predbat also also complains about:
Warn: Validation of apps.yaml found configuration item 'charge_rate' element sensor.solis_battery_input_energy can not be modified
Warn: Validation of apps.yaml found configuration item 'discharge_rate' element sensor.solis_battery_output_energy can not be modified
In the Solax integration this value is only showing the charge/discharge rate in W for the battery but doesn't allow it to be set by PredBat I assume. For the charge/discharge curve generation just reading these sensors' historic data should be sufficient I guess, so no writing to it required?