How to charge an Anker SOLIX with surplus SolarEdge power
My SolarEdge battery can be full while my Anker SOLIX still has room to charge. Once the house and the main battery have taken what they need, the remaining solar can flow out to the grid. If I would rather store some of it for later, the useful question is how to tell the Anker how much spare power there is. I use Home Assistant to pass that information between the two systems.
Anker sponsors my channel and supplied the equipment featured in the video.
Measure export at the grid
I use the SolarEdge meter’s AC power reading, which is different from the inverter’s total solar production. If the panels are generating well but the house is using all of that power, there may be nothing left to divert. The meter at the grid connection is the reading that answers the question I actually care about.
On my setup, positive meter values mean export. Check the sign and the unit on yours before copying the automation. An import reading interpreted as export would make the battery ask for more power at exactly the wrong moment. The examples below use watts and the entity names from my installation.
Give Home Assistant a window to charge
I split the job between two automations. The first watches a schedule helper. Mine starts at 9:30am and ends at 4pm. At the start, it switches the Anker into Third-Party Controlled mode, waits five seconds, selects Grid-to-Battery Charge Power and sets a starting target of 100 W. When the schedule ends, it selects Custom Mode so the Anker can go back to following its own settings.
The schedule lives in the helper, so changing the hours does not mean editing either automation. Set those hours around when you want to store energy and when you would rather export it. That decision depends on your household and tariff.
Adjust the charge target once a minute
The second automation checks at 15 seconds past each minute. It only proceeds while the schedule is on, third-party control is active and the Anker is set to charge from its AC connection. It reads the SolarEdge meter and uses that reading as the requested charge rate. At 700 W of export, it requests 700 W. At 50 W or a negative reading, it requests the 100 W minimum. At 2,500 W, the request is capped at 2,000 W. There is no gradual increase: a reading of 1,000 W can give a 1,000 W target on the next check.
An invalid or stale meter reading also gives a 100 W target. The automation skips the write when the current target already matches or the Anker control is unavailable. The 100 W floor can draw from the grid when there is little or no surplus. And because charging reduces measured export, following that reading directly can produce alternating higher and lower targets. The one-minute interval keeps the commands spaced out; it does not eliminate that feedback.
Adapt the examples to your system
Create or identify your schedule helper, then replace the meter, operating mode, grid flow and power-control entity IDs in both examples as applicable. Check the option values exposed by your integration and choose a charging cap your equipment supports. Treat these as two separate automations. Watch the meter and Anker target together over several checks before deciding whether the setup suits your household. If you try it with another inverter, I’d be interested to hear which meter reading you used.
Automation 1: Schedule and operating mode
alias: Anker Solix - Scheduled 100 W Charging
description: Start at 100 W during the schedule and restore Custom Mode when it ends.
triggers:
- trigger: state
entity_id: schedule.anker_solix_schedule
to: 'on'
- trigger: state
entity_id: schedule.anker_solix_schedule
to: 'off'
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: schedule.anker_solix_schedule
state: 'on'
sequence:
- action: select.select_option
target: {entity_id: select.anker_solix_solarbank_4_e5000_pro_011_operating_mode_device_runs_by_command_in_third_party_controlled}
data: {option: third_party_control}
- delay: {seconds: 5}
- action: select.select_option
target: {entity_id: select.anker_solix_solarbank_4_e5000_pro_011_grid_flow}
data: {option: charge}
- action: number.set_value
target: {entity_id: number.anker_solix_solarbank_4_e5000_pro_011_power_control}
data: {value: 100}
- conditions:
- condition: state
entity_id: schedule.anker_solix_schedule
state: 'off'
sequence:
- action: select.select_option
target: {entity_id: select.anker_solix_solarbank_4_e5000_pro_011_operating_mode_device_runs_by_command_in_third_party_controlled}
data: {option: custom_mode}
mode: restartAutomation 2: Follow SolarEdge export
alias: Anker Solix - SolarEdge Surplus Charging
description: Follow SolarEdge export every minute within 100 to 2000 W.
triggers:
- trigger: time_pattern
minutes: /1
seconds: '15'
conditions:
- condition: schedule.is_on
target: {entity_id: schedule.anker_solix_schedule}
options: {behavior: any, for: '00:00:00'}
- condition: select.is_option_selected
target: {entity_id: select.anker_solix_solarbank_4_e5000_pro_011_operating_mode_device_runs_by_command_in_third_party_controlled}
options: {behavior: any, for: '00:00:00', option: [third_party_control]}
- condition: select.is_option_selected
target: {entity_id: select.anker_solix_solarbank_4_e5000_pro_011_grid_flow}
options: {behavior: any, for: '00:00:00', option: [charge]}
- condition: template
value_template: >-
{% set meter = states.sensor.solaredge_m1_ac_power_2 %}
{% set fresh = is_number(meter.state) and
(as_timestamp(now()) - as_timestamp(meter.last_reported)) < 120 %}
{% set export_w = meter.state | float(100) if fresh else 100 %}
{% set target = [[export_w, 100] | max, 2000] | min | round(0) | int %}
{% set current = states('number.anker_solix_solarbank_4_e5000_pro_011_power_control') %}
{{ is_number(current) and target != (current | float(100)) }}
actions:
- action: number.set_value
target: {entity_id: number.anker_solix_solarbank_4_e5000_pro_011_power_control}
data:
value: >-
{% set meter = states.sensor.solaredge_m1_ac_power_2 %}
{% set fresh = is_number(meter.state) and
(as_timestamp(now()) - as_timestamp(meter.last_reported)) < 120 %}
{% set export_w = meter.state | float(100) if fresh else 100 %}
{% set target = [[export_w, 100] | max, 2000] | min | round(0) | int %}
{{ target }}
mode: single



Comments