batpred icon indicating copy to clipboard operation
batpred copied to clipboard

apps.yaml validation errors - inverter_limit_charge, inverter_limit_discharge and export_limit

Open DJBenson opened this issue 8 months ago • 6 comments

More of a question than a bug but these three entities are thowing validation errors as the validator expects an integer but I'm passing input_number sensors so I can dynamically change these values.

apps.yaml simply references the sensor - do I need to wrap the sensor in something within apps.yaml to parse it as an integer or should I just ignore these.

Example from apps.yaml;

  inverter_limit_charge:
    - input_number.givenergy_aio_max_charge_rate

  inverter_limit_discharge:
    - input_number.givenergy_aio_max_discharge_rate

DJBenson avatar Mar 30 '25 22:03 DJBenson

I'm surprised this works for you, last time I tried using an entity in apps.yaml for the charge rate it didn't work

Am trying to do similar with predbat manual api to overwrite inverter_limit_charge programatically

gcoan avatar Mar 30 '25 22:03 gcoan

It was something which @springfall2008 advised me to do a looooonnnng time ago in the early days of predbat back when I was having issues with my AIO crashing when charging at full power (in fact I think these were added at my request). I don't routinely use it now so it might be broken. Will try it later.

DJBenson avatar Mar 31 '25 07:03 DJBenson

@gcoan FYI it's still working;

Image

That sensor is ONLY read by Predbat, it in turn sets the max charge rate of the GivTCP entity - also works for the other two I mentioned.

DJBenson avatar Apr 01 '25 00:04 DJBenson

Great, interesting, I am sure I tried this, and still have the helper number hanging around, but I couldn't get it to work ages ago.

I'm doing something similar with overwriting inverter_limit_charge via the predbat_manual_api, but that has some different issues #2153 and #2157

Also setting charge/discharge rate alone doesn't fully stop the battery activity, raised a FR #2155 to see if battery pause mode can be set automatically as well

I'll have a look at using the input number because it would be easier to change than updating via the API.

gcoan avatar Apr 01 '25 07:04 gcoan

I might try this myself. In my own homebrew scheduler, I reduce the overnight charge/discharge rate during heatwaves & when a lot of PV is expected, just to keep the battery cells at a reasonable temperature & to reduce waste heat (it gets very hot indoors and I don't want to add to it unnecessarily). Would be good to be able to do the same thing in Predbat too.

WyndStryke avatar Apr 01 '25 19:04 WyndStryke

I put in a fix to the validation code, its not a functional change

springfall2008 avatar Apr 03 '25 07:04 springfall2008