cdpuk / givenergy-local

Home Assistant integration for local access to GivEnergy inverter and battery systems
MIT License
47 stars 14 forks source link

Expose Battery_soc reserve, to enable Timed Export and Discharge #45

Closed reidjr closed 1 year ago

reidjr commented 1 year ago

Without setting battery_soc_reserve to less than 100, then on my inverter, the battery does not discharge in timed discharge or export. The givenergy-modbus set_mode_storage sets a default set_shallow_charge = 100, which then sets battery_soc_reserve = 100.

These changes add battery soc reserve slider to timed discharge and timed export services, and expose set_shallow_charge as a number, and as a slider control.

These changes break the logic to determine battery mode, but if you ignore the soc value check, I think the logic still works.

cdpuk commented 1 year ago

Thanks for your contribution. I think there's a few things going on here so I'm going to suggest we break this up.

That's quite a lot to think about. TLDR:

reidjr commented 1 year ago

I see from several of the comments this may be down to different behaviour between Gen1 Gen2 or firmware versions. This may also mean the suggested "Clarifications" of the descriptions for the services are wrong for other people.

To try to answer in order :-).

No problem, and thanks to you for the excellent integration.