Smart charge/discharge automation for an Anker Solix Solarbank controlled by Tibber (or compatible) dynamic electricity prices, with automatic fallback to the Anker app's "smart" mode.
- Charges the battery from the grid during the cheapest part of the day (default: 1.5 hours before through 1.5 hours after the cheapest Tibber slot).
- Discharges to the grid during the most expensive part of the day (default: 1.0 hour before through 1.0 hour after the most expensive Tibber slot).
- Falls back to
smartmode the rest of the time — the Anker app keeps doing its normal balancing. - Overlap-safe: if the charge and discharge windows would overlap, the
blueprint does nothing and leaves the Solarbank in
smart. - Idempotent: runs every minute but only issues API calls when something actually needs to change.
- Home Assistant (tested on 2026.5.x)
- Anker Solix custom integration installed via HACS
- A dynamic-price sensor whose state attribute contains a list of
{ start: <ISO timestamp>, price: <float> }objects.- Out-of-the-box compatible with
Tibber Smart: use
sensor.tibber_smart_prices_todayand attributeprices_today. - Other integrations work if they expose the same shape — set the attribute name in the blueprint inputs.
- Out-of-the-box compatible with
Tibber Smart: use
Or manually: Settings → Automations → Blueprints → Import Blueprint and paste:
https://raw.githubusercontent.com/Adcompro/ha-anker-solix-tibber-blueprint/main/blueprints/automation/tibber_charge_discharge.yaml
Settings → Automations → Create Automation → Use Blueprint → Anker Solix - Tibber slim laden en terugleveren
Fill in:
| Input | Example |
|---|---|
| Prices sensor | sensor.tibber_smart_prices_today |
| Prices attribute | prices_today |
| Usage mode select | select.solarbank_3_e2700_pro_usage_mode_2 |
| Smart mode option | smart |
| Manual mode option | manual |
| Output preset number | number.solarbank_3_e2700_pro_system_output_preset_2 |
| Backup option switch | switch.solarbank_3_e2700_pro_backup_option_2 |
| Grid export switch | switch.solarbank_3_e2700_pro_allow_grid_export |
| Hours before cheapest slot | 1.5 |
| Hours after cheapest slot | 1.5 |
| Hours before most-expensive slot | 1.0 |
| Hours after most-expensive slot | 1.0 |
| Max discharge power | 2400 |
| Enable boolean (optional) | leave empty, or your own input_boolean.* toggle |
The Solarbank will only be temporarily flipped to manual during the charge or
discharge windows and immediately reset to smart afterwards. So keep the
Anker app on smart — Home Assistant takes over only when needed.
Every minute (and on price updates) the automation:
- Reads
prices_todayfrom the configured sensor. - Finds the slot with the lowest and the slot with the highest price.
- Computes the charge window
[cheapest − before, cheapest + after]and the discharge window[expensive − before, expensive + after]. - Decides the target state —
charge,discharge, orsmart:chargeif now is in the charge window and windows don't overlap.dischargeif now is in the discharge window and windows don't overlap.- Otherwise
smart.
- Compares against the current Solarbank state (mode + switches + output) and only issues service calls if a change is actually needed.
| Target | usage_mode |
backup_option |
allow_grid_export |
output_preset |
|---|---|---|---|---|
charge |
manual |
on |
off |
0 W |
discharge |
manual |
off |
on |
configurable max W |
smart |
smart |
off |
off |
(unchanged) |
If you prefer visible state entities (charge window active, discharge window
active, windows overlap) and separate start/stop automations instead of one
blueprint-driven automation, copy battery_optimizer_package.yaml from this
repository into your Home Assistant packages/ directory.
That version exposes:
sensor.solix_goedkoopste_slot/sensor.solix_duurste_slotbinary_sensor.solix_laadvenster_actiefbinary_sensor.solix_ontlaadvenster_actiefbinary_sensor.solix_vensters_overlappen
Edit the entity_ids inside the file to match your Solarbank.
- Tibber's
prices_todayattribute is in 15-minute slots. "Cheapest slot" means the cheapest 15-minute interval — the charge window then extends symmetrically around the START of that interval. - Edge case: when the cheapest/most-expensive slot is near midnight, part of the window may fall on the previous/next day and won't activate as expected. Acceptable for the common case but worth knowing.
- The blueprint sets the Solarbank to
manualmode during windows. Make sure you're OK with that — the Anker app will show "manual" briefly.
MIT — see LICENSE.
PRs welcome. Especially helpful: adapters for other price sources (Nordpool, EnergyZero, ENTSO-e, Frank Energie) and tests against more Solarbank models.