Peak shaving is one of the most effective ways to lower your electricity bill—especially if your utility charges based on peak demand. The concept is simple: prevent your power consumption from spiking above a threshold. The implementation? That's where Home Assistant comes in.
Whether you have a home battery, an EV, or just smart plugs, you can implement peak shaving strategies that reduce demand charges by 20-40%. Here's how.
What Is Peak Shaving?
Peak shaving means reducing your maximum power draw during high-demand periods. Instead of pulling 8 kW from the grid when your EV charger, heat pump, and oven all run simultaneously, you keep consumption below a set limit—say 5 kW.
Why does this matter? Two reasons:
- Demand charges: Many utilities charge per kW of peak demand, not just per kWh consumed. In Belgium, the capacity tariff charges €40-80/kW/year for your highest monthly peak.
- Grid stability: Some countries (Netherlands, Belgium, parts of Germany) are introducing capacity-based tariffs that penalize high peaks. Lower peaks = lower bills.
Calculate Your Savings
Use our free peak shaving calculator to estimate how much you could save based on your current peak demand and local rates.
Strategy 1: Load Shifting (No Battery Needed)
The simplest form of peak shaving: don't run heavy appliances simultaneously. This requires zero hardware investment—just smart scheduling.
Identify Your Peak Creators
Check your energy dashboard for the biggest consumers. Typical culprits:
- EV charger: 3.7-11 kW
- Heat pump: 2-5 kW
- Electric oven: 2-3 kW
- Dryer: 2-3 kW
- Washing machine (heating cycle): 2 kW
Automation: Sequential Appliance Control
This automation prevents the EV charger from running when total household power exceeds a threshold:
# Peak Shaving - Pause EV charging during high demand
alias: "Peak Shaving - EV Pause"
trigger:
- platform: numeric_state
entity_id: sensor.grid_power
above: 4000
for: "00:01:00"
condition:
- condition: state
entity_id: switch.ev_charger
state: "on"
action:
- service: switch.turn_off
target:
entity_id: switch.ev_charger
- service: notify.mobile_app
data:
title: "Peak Shaving Active"
message: "EV charging paused - grid power above 4 kW"
Pair this with a matching automation that resumes charging when power drops below 3 kW. The 1 kW gap prevents rapid on/off cycling.
Strategy 2: Battery-Based Peak Shaving
If you have a home battery (Tesla Powerwall, BYD, Huawei Luna), you can use it to absorb demand spikes. The battery discharges when grid power exceeds your threshold, keeping your grid draw flat.
The Logic
- Monitor real-time grid power consumption
- When grid power exceeds the threshold (e.g., 5 kW), command the battery to discharge
- The discharge amount equals the difference: if grid is at 7 kW and threshold is 5 kW, discharge 2 kW
- When grid power drops below threshold, stop battery discharge
# Battery Peak Shaving - Discharge above threshold
alias: "Battery Peak Shaving"
trigger:
- platform: numeric_state
entity_id: sensor.grid_power
above: 5000
condition:
- condition: numeric_state
entity_id: sensor.battery_soc
above: 20 # Keep 20% reserve
action:
- service: number.set_value
target:
entity_id: number.battery_discharge_power
data:
value: >
{{ (states('sensor.grid_power') | int - 5000) | abs }}
Battery API Varies
The exact service calls depend on your battery's integration. Tesla, Huawei, and SolarEdge all use different entity structures. Check your integration's documentation for the correct discharge control entities.
Strategy 3: Solar Self-Consumption Optimization
If you have solar panels, peak shaving works in reverse during sunny hours. Instead of exporting surplus to the grid at low feed-in tariffs, use it to pre-charge your battery or pre-heat your home. This reduces afternoon/evening peaks when solar production drops.
The concept: When solar production exceeds consumption, divert energy to scheduled loads (hot water, EV, battery) instead of exporting. Then when evening demand peaks hit, you've already handled those loads.
Setting Your Peak Threshold
Choosing the right threshold is critical. Too low and you'll constantly trigger load shedding. Too high and you won't save anything.
How to Find Your Optimal Threshold
- Check your energy dashboard for the past month's peak power readings
- Look at your utility bill for the demand charge component
- Set your threshold at 60-70% of your typical peak
- Monitor for two weeks and adjust based on how often automations trigger
For a household with a typical peak of 8 kW, start with a 5 kW threshold. This prevents the highest spikes while still allowing normal usage.
Monitoring Peak Shaving Performance
Create a template sensor to track your daily maximum grid power. This lets you see the direct impact of peak shaving over time:
template:
- sensor:
- name: "Daily Peak Power"
unit_of_measurement: "W"
state: >
{{ state_attr('sensor.grid_power', 'max_value')
| default(states('sensor.grid_power'), true) }}
Track this value over weeks. A successful peak shaving setup should show a clear downward trend in daily peaks, with fewer and smaller spikes above your threshold.
Complete Peak Shaving System
Our Energy Dashboard Guide includes production-ready peak shaving automations, battery management logic, and dashboards that visualize your demand reduction. All YAML included.
View Energy Dashboard GuideReal Savings Examples
Peak shaving savings depend heavily on your tariff structure:
- Belgium (capacity tariff): Reducing peak from 8 kW to 5 kW saves €120-240/year
- Netherlands (future capacity pricing): Similar structure, estimated €100-200/year
- Germany (demand charges on larger connections): €50-150/year for residential
- US (time-of-use + demand charges): Varies widely, $200-500/year possible with battery
The ROI depends on whether you already own a battery. If you do, peak shaving is essentially free—it's just software. If you need to buy a battery specifically for peak shaving, the payback period is typically 5-8 years.
Either way, load shifting with smart plugs costs nothing and can still cut your peaks by 20-30%.