Intelligent battery energy management for Home Assistant. Automatically optimize your battery system with dynamic electricity pricing to minimize costs and maximize savings.
Disclaimer: This is an unofficial integration and is not affiliated with or endorsed by Tesla, Sigenergy, Sungrow, FoxESS, GoodWe, AlphaESS, ESY Sunhome, Solax, SAJ, Fronius, SolarEdge, Neovolt, Bytewatt, Anker, Amber Electric, Localvolts, Flow Power, AGL, GloBird, CovaU, SA Power Networks, Octopus Energy, EPEX/ENTSO-E, or AEMO. Use at your own risk.
Warning
The built-in optimizer is actively under development. You should expect occasional bugs and schedules that don't behave as expected — particularly on unusual tariffs, battery configurations, or edge cases. If you see something odd, please report it on Discord with your tariff details and the action plan it generated.
Battery export curtailment controls the battery/Tesla export path. Sigenergy, AlphaESS, and SolarEdge installations can instead enable their own DC solar curtailment option, which operates when battery dispatch is disabled. In Monitoring Mode, DC writes remain blocked unless Allow curtailment control in Monitoring Mode is explicitly enabled.
| System | Connection | Control |
|---|---|---|
| Tesla Powerwall | PowerSync.cc, Fleet API, or Teslemetry | TOU tariff sync, force charge/discharge, export rules, off-grid/reconnect |
| FoxESS (H1, H3, H3-Pro, H3 Smart, KH + OEM rebrands) | Modbus TCP or RS485 | Work mode, force charge/discharge, backup reserve |
| Sigenergy | Cloud API + Modbus TCP | Remote EMS control, force charge/discharge, DC solar curtailment. Smart Optimization requires Remote EMS with Sigenergy AI/native optimisation disabled; see Sigenergy setup |
| Solax Hybrid (X1/X3, Gen4/Gen5/Gen6, AC Retro-Fit) | Via Solax Modbus integration (HACS) | LP optimizer, force charge/discharge, backup reserve, export control |
| GoodWe (ET, EH, BT, BH, ES, EM, BP) | UDP direct control, TCP local, or TCP/502 with HA GoodWe entity mode for LAN/Kit-20 | Force charge/discharge, backup reserve, export limit. LAN/Kit-20 force modes require entity mode; see GoodWe setup |
| Sungrow SH-series | Modbus TCP, or a supported companion integration for monitoring | Force charge/discharge, rate limiting and export control on supported direct routes. See Sungrow setup for connection capabilities and retired dual-inverter settings |
| AlphaESS (SMILE5, SMILE-Hi5/Hi10, SMILE-B3, SMILE-T10, SMILE-G3, Storion-T30) | Modbus TCP + optional Cloud API, or Cloud-only monitoring | Force charge/discharge, dispatch SOC targeting, and DC solar curtailment over Modbus; telemetry/planning only in Cloud-only mode |
| ESY Sunhome (HM series) | Via ESY Sunhome companion integration (HACS) | LP optimizer, AEMO spike export, Saving Sessions (mode-only control) |
| SAJ H2 / HS2 | Via SAJ H2 Modbus companion integration (HACS) | LP optimizer, force charge/discharge, AEMO spike export (no backup reserve write) |
| Fronius GEN24 storage (BYD Battery-Box / Reserva) | Via Fronius Modbus companion integration (HACS) | LP optimizer, force charge/discharge, hold SOC, restore normal, backup reserve |
| Neovolt / Bytewatt | Via Neovolt Modbus companion integration (HACS) | LP optimizer, force charge/discharge, backup reserve |
| SolarEdge Home Battery | Via SolarEdge HA storage-control entities, plus Modbus TCP/entity fallback for inverter curtailment | Force charge/discharge, restore normal, backup reserve, Hold SOC, Smart Optimization dispatch, mobile controls, telemetry, live flow, usage stats, and active-power curtailment when the writable SolarEdge storage entities are exposed |
| Anker Solix | Direct local X1 Modbus TCP, official local Anker HA integration, or unofficial Anker cloud HA bridge | Telemetry, live flow, Smart Optimization, force charge/discharge and restore when direct Modbus or writable official HA controls are available. Unofficial cloud bridge can be monitoring-only |
| Custom / external controller | Existing Home Assistant entities for battery SOC, battery power, grid power, solar power, and home load | Planner-only Smart Optimization in monitoring mode. PowerSync exposes optimizer decisions and telemetry; your existing controller or automations keep ownership of hardware dispatch |
Each battery system has a Connection method setting. Choose either the PowerSync-owned direct route or a supported Home Assistant battery integration. Home Assistant-backed and monitoring-only methods reuse the selected upstream config entry and do not open a second PowerSync hardware connection. PowerSync validates the source when changing a connection profile, restores any active temporary battery mode through the old route, and blocks the change if cleanup cannot be proven. Changing battery brand is a separate flow that saves the selection before the new connection form finishes; closing it does not guarantee rollback. Check connection methods and current limitations before changing an existing installation. The dashboard can show recommended or all discovered upstream battery, solar, grid, load, energy, inverter, and diagnostic sensors without cloning them into duplicate PowerSync entities.
Solar inverters that bypass the battery can be curtailed during negative feed-in prices:
| Inverter | Connection | Method |
|---|---|---|
| Fronius | SunSpec Modbus | WMaxLimPct power limiting |
| Sungrow SG | Modbus TCP | Percentage power limit |
| Sungrow SH | Modbus TCP | Export limit register |
| Enphase | IQ Gateway REST API | DPEL/DER export limit |
| FoxESS | Modbus TCP | Remote active power |
| Huawei | Smart Dongle Modbus | Feed grid power limit |
| GoodWe | Modbus TCP, or GoodWe Experimental HA entities for standalone MS | Export limit register/entity with verified restore |
| Zeversolar | HTTP API | Power limit percentage |
| Solax | Modbus TCP or HA entity | Export control user limit (reg 0x42) |
| Sigenergy | Modbus TCP | Grid export limit / DC curtailment |
| AlphaESS | Modbus TCP | MAX feed-into-grid percent (register 0x0800) |
| Provider | Country | Pricing |
|---|---|---|
| Amber Electric | Australia | Dynamic 5-min & 30-min pricing plus partial-day metered cost (API token required) |
| Localvolts | Australia | Real-time 5-min wholesale pricing (API key + Partner ID) |
| Flow Power / AEMO | Australia | Official Flow Power Web Data API or AEMO wholesale pricing |
| AGL Battery Rewards | Australia | Address-specific import tariff with configurable calendar seasons, daily 5pm-9pm evening feed-in rates, and off-peak feed-in rates |
| Globird / AEMO VPP | Australia | Retail tariff schedule + AEMO spike detection |
| CovaU SolarMax | Australia | Fixture-backed NSW, Queensland and South Australia stepped tariffs with measured daily free-import and premium-export quotas |
| Octopus Energy | UK | Dynamic 30-min (Agile, Go, Intelligent Go, Flux, Tracker). Reads from BottlecapDave's integration when installed |
| EPEX Day-Ahead | EU (DE, AT, BE, NL, DK, SE) | Native 15-min day-ahead pricing for Belgium; hourly aggregation elsewhere, with configurable surcharge & tax |
| NZ TOU | New Zealand | Static TOU (Octopus NZ, Electric Kiwi, Contact Energy, Custom) |
- Install via HACS (custom repository)
- Add Integration — Settings > Devices & Services > Add Integration > "PowerSync"
- Pick your electricity provider and complete its account, plan and tariff periods where required
- Choose your battery and connection method and follow the applicable optimizer, sensor and connection screens. Custom / external controller uses your existing Home Assistant telemetry and keeps hardware dispatch with your controller
- Verify fresh sensors and prices using the setup checks. Before enabling automatic dispatch, configure Smart Optimization, check HA optimiser access, and confirm the selected route supports control
To change an existing installation, open Settings > Devices & Services > PowerSync > Configure and follow the configuration index. Each section has its own settings; you do not need to repeat initial setup.
Tesla Powerwall users — two options:
- Home Assistant integration (this repo): Monitoring, dashboards and manual controls remain free. HA optimiser access is A$4/month directly, or qualifying recurring GitHub sponsorship from US$3/month while active. Direct signup requires a card and gives one seven-day HA trial, then automatic monthly billing until cancelled. GitHub sponsorship starts paying immediately. Activation and subscription guide. Tesla provider sign-in remains separate from optimiser activation.
- PowerSync Cloud ($4.99/month): No Home Assistant required. Fully hosted service — sign in with Tesla, choose your retailer (Amber, GloBird, Energy Locals), and PowerSync handles negative-price protection, AEMO spike export, and real-time monitoring entirely in the cloud. Includes iOS/Android apps.
- Home Assistant with HACS installed
- A supported battery system with network access, or existing Home Assistant sensors for a custom/external controller setup
- Electricity provider credentials where required: Amber API token, Localvolts API key + Partner ID, Flow Power API key from More > Web Data Access, or Octopus Saving Sessions credentials
Or manually:
- Open HACS > three dots > Custom repositories
- Add
https://github.com/bolagnaise/PowerSync(Category: Integration) - Download PowerSync and restart Home Assistant
- Settings > Devices & Services > Add Integration > "PowerSync"
- Follow the installation guide for your provider, battery system and setup checks
The wiki covers the Home Assistant integration across all supported batteries and connection methods. Start with the task you need:
- Find a setting — follows the actual Configure menu, including conditional and Advanced entries
- Enter tariffs and time periods — rates, weekdays, overnight periods, seasons and saving changes
- Configure optimization — goals, reserves, forecasts and dispatch limits
- Use controls and automations — HA entities/services and PowerSync automation actions
- Connect the mobile app — client setup and navigation
- Check current limitations — known configuration issues and precautions
| Feature | Description | Wiki |
|---|---|---|
| Battery System Setup | Tesla, FoxESS, Sigenergy, GoodWe, Sungrow, AlphaESS, ESY Sunhome, Solax Hybrid, SAJ H2/HS2, Fronius GEN24 storage, Neovolt / Bytewatt, SolarEdge, Anker Solix, and custom/external controller setup guides | Setup Guide |
| Smart Optimization | Built-in LP optimizer calculates optimal charge/discharge schedule using prices, solar, and load. Optional controls include Profit Max, Charge By Time, auto-applied forecast reserve, selected household load history, planned EV load, and measured quota settlement for GloBird ZeroHero/ZeroCharge and CovaU SolarMax. Solar forecasting via Solcast, Open-Meteo Solar Forecast, or Volcast must be configured for accurate scheduling. Optional AI Plan Explanation provider eligibility and billing guidance is available in the Smart Optimization guide. | Details |
| Flexible Exports | Reads a fail-closed operating envelope from separately certified site equipment exposed in Home Assistant. This release is monitoring-only while the required SAPN site soak is completed; active enforcement remains release-gated. PowerSync is not a CSIP-AUS client and provides no network-limit override. | Details |
| EV Smart Charging | Coordinate EV charging with battery optimization. Smart Schedule offers Solar Only, Prefer Solar, Cheapest and Meet Deadline strategies; Solar Surplus, Scheduled Charging and Price-Level Charging are separate modes | Details |
| Advanced Features | Curtailment, network monitoring, demand charges, weather and solar forecasts, updates, and the optional Cloud energy-flow reporter | Details |
| Sensors | Core power sensors, daily energy tracking, FoxESS Modbus sensors, optimizer status | Full List |
| Services | Force charge/discharge, hold SOC, TOU sync, backup reserve, inverter curtailment, off-grid/reconnect | Reference |
| Troubleshooting | Connection issues, debug logging, common fixes | Guide |
Smart Schedule passes the optimizer's configured grid-import limit to the live EV controller. The controller uses the lowest available positive limit from the EV session, optimizer, Tesla site and Home Power settings. Deadline charging remains dynamically adjustable; reaching a departure target does not override site capacity. The first Smart Schedule command checks live site headroom for every charger type and waits if telemetry is unavailable. Deadline sessions skip discretionary battery-charge reservation in both initial and periodic control, including shared Tesla sessions. An explicit EV session limit can reduce the site limit but cannot increase it.
Whole-site power balancing uses site power telemetry. Optional per-phase current protection additionally requires fresh mains-current sensors in amps; a grid-power sensor in kW cannot be selected as a phase-current sensor.
For a static custom tariff uploaded to Tesla, daily_supply_charge is an
optional decimal amount in the tariff currency per day. Set it when your
contracted supply charge differs from the selected tariff template. If it is
omitted, PowerSync uses that template's daily supply charge when available;
tariffs without either value keep their existing no-amount daily-charge row.
Remote monitoring and control via iOS and Android.
iOS: Join TestFlight | Android: Google Play
- Get your Home Assistant URL (local or Nabu Casa)
- Create a Long-Lived Access Token in your HA profile
- Enter URL + token in the app
- Dashboard — Live pricing, power flow, energy summary
- Controls — Force charge/discharge, backup reserve, off-grid/reconnect
- Smart Optimization — 24-hour battery schedule, action plan, cost tracking, Profit Max, and Charge By Time
- EV Charging — Smart scheduling, solar surplus, price-level charging
- Automations — Time, price, and grid-status triggers with battery/EV/grid actions
- Settings — Battery, EV, provider, and optimization configuration
- Demo Mode — Try the app without a Home Assistant connection using simulated data


























- Discord: https://discord.gg/eaWDWxEWE3 — bug reports, feature requests, and support
- Wiki: https://github.com/bolagnaise/PowerSync/wiki
Copyright (c) 2024–2026 Ben Boller. All rights reserved.
Source licensed under PolyForm Noncommercial 1.0.0 for personal, hobby, and noncommercial use. The hosted HA optimiser verification service requires a separate subscription or qualifying active sponsorship. This does not change the source licence.
Commercial use is prohibited without prior written permission from the copyright holder. This includes use within a commercial organisation, integration into a paid product or service, and redistribution as part of a commercial system. To enquire about a commercial licence, contact dev@powersync.cc.





