Closed reidjr closed 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.
battery_soc_reserve
via the number
platform is definitely the right thing to do. This mirrors how you'd change it via the portal or app as a standalone setting.battery_soc_reserve
.battery_soc_reserve
only appears under the "Battery Options" section. The services were modelled after these screens for familiarity.battery_soc_reserve
set to 100. For me, changing battery_soc_reserve
has no effect. Buried in the app documentation it suggets this setting is only effective when an EPS system is connected.client.set_mode_storage
is setting the value for battery_soc_reserve
to 100, but that's inconsistent with the GivEnergy portal, which maintains any existing value as the user switches between modes. The proposed change then has to make another call to change the value again. The integration probably needs to bypass client.set_mode_storage
and change settings directly to have the right effect. That's quite a lot to think about. TLDR:
number.py
changes first.battery_soc_reserve
is doing something for you.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.
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.