Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charge hold doesn't work on Growatt SPH via Solar Assistant #1881

Open
tomkentpayne opened this issue Jan 19, 2025 · 4 comments
Open

Charge hold doesn't work on Growatt SPH via Solar Assistant #1881

tomkentpayne opened this issue Jan 19, 2025 · 4 comments
Assignees

Comments

@tomkentpayne
Copy link

tomkentpayne commented Jan 19, 2025

Describe the bug
In charge hold mode, the inverter carries on charging the battery past Predbat's target SOC

Expected behaviour
The Growatt SPH inverter would be put into "Battery first" mode, with "number.growatt_sph_battery_first_stop_charge" set to the max target SOC (or potentially instead have battery first mode and "number.growatt_sph_battery_first_charge_rate" set to 0W, but that may stop solar charging too, I'm unsure).

Predbat version

v8.11.1

Environment details

  • Inverter and battery setup - Growatt SPH inverter, connected via Solar Assistant, using the standard MQTT entities that get created within Home Assistant. Growatt Solar Assistant template used in apps.yaml, with "spa" changed to "sph".
  • Standard HAOS installer or Docker - HAOS running on a proxmox VM, Predbat installed as an add-on.
@tomkentpayne
Copy link
Author

tomkentpayne commented Jan 20, 2025

Update - I think I've worked around the issue with a pair of automations:

One that fixes it by mirroring the charge limit:

alias: Mirror charge limit SOC (predbat)
description: ""
triggers:
  - entity_id:
      - sensor.predbat_sa_0_charge_limit
    trigger: state
conditions:
  - condition: not
    conditions:
      - condition: state
        entity_id: select.predbat_mode
        state: Monitor
  - condition: state
    entity_id: switch.predbat_set_read_only
    state: "off"
actions:
  - action: number.set_value
    metadata: {}
    data:
      value: "{{ states('sensor.predbat_sa_0_charge_limit') }}"
    target:
      entity_id: number.growatt_sph_battery_first_stop_charge
mode: single

And another one to mirror the discharge rate (that isn't needed to solve this problem but I think may be needed in some scenarios?):

alias: Mirror discharge rate (predbat)
description: ""
triggers:
  - entity_id:
      - sensor.predbat_sa_0_discharge_rate
    trigger: state
conditions:
  - condition: not
    conditions:
      - condition: state
        entity_id: select.predbat_mode
        state: Monitor
  - condition: state
    entity_id: switch.predbat_set_read_only
    state: "on"
actions:
  - action: number.set_value
    metadata: {}
    data:
      value: "{{ states('sensor.predbat_sa_0_discharge_rate') / 3000 * 100 }}"
    target:
      entity_id: number.growatt_sph_free_mode_discharge_rate
  - action: number.set_value
    metadata: {}
    data:
      value: "{{ states('sensor.predbat_sa_0_discharge_rate') / 3000 * 100 }}"
    target:
      entity_id: number.growatt_sph_grid_first_discharge_rate
mode: single

@tomkentpayne
Copy link
Author

Initial problem (battery power still at 3000W charging during "Hold charging" predbat status):

Image

After my workaround automations (battery power drops to 0W during "Hold charging" status):

Image

@tomkentpayne
Copy link
Author

I had also added these fields to apps.yaml in addition to the ones in the solar_assistant_growatt.yaml template, but I don't think they fixed the issue (unless maybe they would've, if it hadn't been for predbat's charge/discharge rates being in W but the Solar Assistant versions wanting a percentage?):

  charge_limit:
    - number.growatt_sph_battery_first_stop_charge
  charge_rate:
    - number.growatt_sph_battery_first_charge_rate
  discharge_rate:
    - number.growatt_sph_grid_first_discharge_rate
  load_power:
    - sensor.growatt_sph_load_power

@tomkentpayne
Copy link
Author

tomkentpayne commented Jan 20, 2025

Looking at the documentation on the inverter settings and the Solar Assistant settings I've spotted that the "SA" inverter type used by this template has "has_target_soc": False (meaning if charge_limit is defined in apps.yaml it'd be ignored). Would charge_limit be satisfied by number.growatt_sph_battery_first_stop_charge?
If so then the fix for this would be for the "SA" inverter type to have "has_target_soc": False, and the Growatt Solar Assistant template to have:

  charge_limit:
    - number.growatt_sph_battery_first_stop_charge

Edit - the downside is that number.growatt_sph_battery_first_stop_charge being used, as I have in my workaround automation, results in excess solar PV not charging the battery. Instead "Holding charge" mode needs to be implemented by select.growatt_sph_work_mode_priority being set to "Battery first", and select.growatt_sph_battery_first_grid_charge being set to Disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants