Hi everybody,
Some of you may know my old PV Solar Excess Optimizer blueprint - a pyscript + blueprint combo that automatically switches your appliances on and off based on excess solar power.
After a long break I finally picked development back up and rebuilt the whole thing from the ground up as a proper HACS integration.
No more pyscript, no more copying files into config/, no more YAML wrangling. Everything is configured through a real config flow UI.
What it does
PV Excess Control is a comprehensive Home Assistant integration for intelligent solar excess power optimization and cheap grid tariff management. It looks at your live PV / battery / grid sensors, your solar forecast and your electricity tariff, and decides - every 30 seconds - which of your appliances should be on, off, or running at what current.
Think of it as the brain that sits between your inverter and your wallbox / heatpump / dishwasher / heat rod / pool pump / … and makes sure as much sun as possible goes into your devices instead of being exported for cents.
Highlights
-
Priority-based appliance control - prioritize multiple appliances (1–1000), the optimizer allocates excess top-down -
Dynamic current control for EV chargers / wallboxes (6–32 A, 1- and 3-phase) -
Battery-aware optimization with three strategies: Battery First, Appliance First, Balanced -
Tariff integration - Tibber, Awattar, Nordpool, Octopus Energy and generic price sensors -
Solar forecast integration - Solcast, Forecast.Solar and generic forecast sensors -
24-hour forward-looking planner - weather-aware pre-planning with configurable plan influence (reactive, forecast-biased, or schedule-driven) -
Export limit management - absorbs would-be-curtailed power when feed-in caps apply -
EV SoC-aware charging - considers EV battery level, connection status and “must be charged by” deadlines -
Battery discharge protection - limits battery discharge when big consumers are running -
Self-consumption analytics - savings, self-consumption ratio, daily / monthly statistics -
Configurable notifications - per-event toggles for appliance changes, summaries, warnings -
Extensive dashboard examples - ready-to-use YAML for Mushroom, ApexCharts, power-flow-card-plus and more -
Manual override, min/max runtime constraints, time windows, grid supplementation, appliance dependencies, per-appliance averaging window, minimum battery SoC protection … and more
Full feature list and docs in the README.
Requirements
-
Home Assistant 2025.8 or newer
-
A solar inverter with power sensors exposed to Home Assistant (standard or hybrid)
-
HACS for the recommended installation method
Installation
-
Open HACS → three-dot menu → Custom repositories
-
Add
https://github.com/InventoCasa/PV-Excess-Controlas an Integration -
Search for PV Excess Control and click Download
-
Restart Home Assistant
-
Settings → Devices & Services → Add Integration → PV Excess Control
That’s it. The config flow walks you through inverter type (standard / hybrid), sensor mapping, tariff provider, forecast provider, and then you start adding your appliances one by one.
Architecture (for the curious)
Under the hood, the integration uses a hybrid real-time + planning approach:
-
Real-time controller (every 30 s): reads live sensor data and applies optimizer decisions
-
Forward-looking planner (every 15 min): builds optimal 24-hour schedules from forecast + tariff data
-
Pure-logic optimizer: decision engine
The optimizer is structured around four phases: ASSESS (average excess from history buffer), ALLOCATE (assign excess to appliances by priority), SHED (turn off lowest-priority when excess is negative), and BATTERY DISCHARGE PROTECTION.
Feedback welcome
<<< Currently the integration is in beta state, so expect some bugs! >>>
If you find any bugs (or have some feature ideas), please create an issue on GitHub.
