Summary
Request to add native support for capacity-based grid tariffs (effektavgift) to the BESS Manager optimization engine. While the Swedish government stopped the mandatory requirement for all grid operators to introduce peak tariffs by January 2027 in March 2026, there is nothing in legislation that prohibits peak tariffs, and during the interim period it is up to each grid operator whether they want to apply them. Several operators including my own (SEOM, Sollentuna) are continuing with their existing peak tariff structure, meaning this feature remains relevant for a meaningful subset of Swedish BESS Manager users. GitHubHome Assistant
Background — Swedish Effektavgift Structure
As of March 2026, 21 of Sweden's approximately 170 grid operators had introduced peak tariffs for household customers. These operators can continue applying their tariffs voluntarily. The billing model typically works as follows: github
Measurement: Average of the 3 highest hourly grid import values during Mon–Fri 07:00–19:00 each month
Exclusions: Weekends and public holidays excluded from measurement
Charge: Monthly fee per kW of average peak
My operator (SEOM, Sollentuna):
Winter rate (Nov–Mar): 145 SEK/kW/month
Summer rate (Apr–Oct): 72.5 SEK/kW/month
Peak window: Mon–Fri 07:00–19:00 (public holidays excluded)
Measurement: Top 3 hourly peaks averaged
The Problem with Current BESS Manager Behaviour
BESS Manager currently optimizes purely for energy cost (spot price + markup + grid fees per kWh). It has no awareness of capacity tariff costs. This means it can decide to:
Charge the battery from the grid during 07:00–19:00 Mon–Fri if spot prices are low — adding 5 kW of grid draw during the peak measurement window
Not discharge the battery to cover home loads during a peak demand moment — missing an opportunity to reduce the measured peak
In my case with a 15 kWh Growatt ARK battery and 5 kW max charge power, an unnecessary grid charge during peak hours could add 5 kW to my monthly peak measurement, costing an extra 725 SEK/month in winter — far exceeding any energy cost saving from buying cheap electricity.
Proposed Solution
Add capacity tariff awareness to the DP optimization engine with the following configuration parameters:
yamlpeak_tariff:
enabled: true
rate_winter: 145 # SEK/kW/month (Nov-Mar)
rate_summer: 72.5 # SEK/kW/month (Apr-Oct)
peak_window_start: "07:00"
peak_window_end: "19:00"
peak_days: [mon, tue, wed, thu, fri]
exclude_public_holidays: true
measurement_method: top3_hourly_average
current_month_peak_sensor: sensor.tibber_pulse_max_power
Optimization logic addition:
For each period inside the peak window, add a capacity cost term to the DP objective:
pythonif is_peak_window(period) and not is_holiday(period):
projected_grid_draw = home_consumption - solar_production + battery_charge_power
if projected_grid_draw > current_month_peak_kw:
capacity_cost = peak_tariff_rate / periods_in_month
effective_buy_price += capacity_cost
Additionally, during peak windows the optimizer should consider discharging the battery to cover home loads even when energy prices don't justify it, if doing so prevents a new monthly peak being set.
Current Workaround
As a workaround I've implemented a HA automation that blocks the switch.charge_from_grid entity during peak hours and excludes public holidays using the HA Holiday calendar. This prevents the worst case but doesn't give BESS Manager the intelligence to actively use the battery to suppress peak demand:
yamlalias: "BESS - Peak window grid charge guard"
trigger:
- platform: time_pattern
minutes: "/15"
condition:
- condition: time
after: "07:00:00"
before: "19:00:00"
weekday: [mon, tue, wed, thu, fri]
- condition: template
value_template: >
{% set holidays = ["New Year's Day", "Epiphany", "Good Friday",
"Easter Sunday", "Easter Monday", "May Day", "Ascension Day",
"Whit Sunday", "National Day", "Midsummer Eve", "Midsummer Day",
"All Saints' Day", "Christmas Eve", "Christmas Day", "Boxing Day",
"New Year's Eve"] %}
{{ state_attr('calendar.sweden', 'message') not in holidays }}
- condition: state
entity_id: switch.qdl3da90yp_charge_from_grid
state: "on"
action:
- service: switch.turn_off
target:
entity_id: switch.qdl3da90yp_charge_from_grid
This is reactive rather than intelligent — BESS doesn't factor capacity cost into its planning horizon.
Tibber Pulse Integration Opportunity
For users with Tibber Pulse, sensor.tibber_pulse_monthly_peak_hour_consumption provides the current month's highest measured peak. This could feed directly into the optimizer to understand how close the current hour is to setting a new monthly peak — enabling more nuanced decisions.
Impact
With winter effektavgift rates of 145 SEK/kW/month, a single unnecessary 5 kW grid charge during peak hours costs 725 SEK — equivalent to many months of energy cost savings from BESS optimization. For users on capacity tariffs, this feature is arguably more financially impactful than spot price optimization.
Happy to test any implementation and provide feedback from a real SE3 installation with Growatt ARK 15 kWh + MOD 10KTL3-XH + Tibber Pulse.
Summary
Request to add native support for capacity-based grid tariffs (effektavgift) to the BESS Manager optimization engine. While the Swedish government stopped the mandatory requirement for all grid operators to introduce peak tariffs by January 2027 in March 2026, there is nothing in legislation that prohibits peak tariffs, and during the interim period it is up to each grid operator whether they want to apply them. Several operators including my own (SEOM, Sollentuna) are continuing with their existing peak tariff structure, meaning this feature remains relevant for a meaningful subset of Swedish BESS Manager users. GitHubHome Assistant
Background — Swedish Effektavgift Structure
As of March 2026, 21 of Sweden's approximately 170 grid operators had introduced peak tariffs for household customers. These operators can continue applying their tariffs voluntarily. The billing model typically works as follows: github
Measurement: Average of the 3 highest hourly grid import values during Mon–Fri 07:00–19:00 each month
Exclusions: Weekends and public holidays excluded from measurement
Charge: Monthly fee per kW of average peak
My operator (SEOM, Sollentuna):
Winter rate (Nov–Mar): 145 SEK/kW/month
Summer rate (Apr–Oct): 72.5 SEK/kW/month
Peak window: Mon–Fri 07:00–19:00 (public holidays excluded)
Measurement: Top 3 hourly peaks averaged
The Problem with Current BESS Manager Behaviour
BESS Manager currently optimizes purely for energy cost (spot price + markup + grid fees per kWh). It has no awareness of capacity tariff costs. This means it can decide to:
Charge the battery from the grid during 07:00–19:00 Mon–Fri if spot prices are low — adding 5 kW of grid draw during the peak measurement window
Not discharge the battery to cover home loads during a peak demand moment — missing an opportunity to reduce the measured peak
In my case with a 15 kWh Growatt ARK battery and 5 kW max charge power, an unnecessary grid charge during peak hours could add 5 kW to my monthly peak measurement, costing an extra 725 SEK/month in winter — far exceeding any energy cost saving from buying cheap electricity.
Proposed Solution
Add capacity tariff awareness to the DP optimization engine with the following configuration parameters:
yamlpeak_tariff:
enabled: true
rate_winter: 145 # SEK/kW/month (Nov-Mar)
rate_summer: 72.5 # SEK/kW/month (Apr-Oct)
peak_window_start: "07:00"
peak_window_end: "19:00"
peak_days: [mon, tue, wed, thu, fri]
exclude_public_holidays: true
measurement_method: top3_hourly_average
current_month_peak_sensor: sensor.tibber_pulse_max_power
Optimization logic addition:
For each period inside the peak window, add a capacity cost term to the DP objective:
pythonif is_peak_window(period) and not is_holiday(period):
projected_grid_draw = home_consumption - solar_production + battery_charge_power
if projected_grid_draw > current_month_peak_kw:
capacity_cost = peak_tariff_rate / periods_in_month
effective_buy_price += capacity_cost
Additionally, during peak windows the optimizer should consider discharging the battery to cover home loads even when energy prices don't justify it, if doing so prevents a new monthly peak being set.
Current Workaround
As a workaround I've implemented a HA automation that blocks the switch.charge_from_grid entity during peak hours and excludes public holidays using the HA Holiday calendar. This prevents the worst case but doesn't give BESS Manager the intelligence to actively use the battery to suppress peak demand:
yamlalias: "BESS - Peak window grid charge guard"
trigger:
minutes: "/15"
condition:
after: "07:00:00"
before: "19:00:00"
weekday: [mon, tue, wed, thu, fri]
value_template: >
{% set holidays = ["New Year's Day", "Epiphany", "Good Friday",
"Easter Sunday", "Easter Monday", "May Day", "Ascension Day",
"Whit Sunday", "National Day", "Midsummer Eve", "Midsummer Day",
"All Saints' Day", "Christmas Eve", "Christmas Day", "Boxing Day",
"New Year's Eve"] %}
{{ state_attr('calendar.sweden', 'message') not in holidays }}
entity_id: switch.qdl3da90yp_charge_from_grid
state: "on"
action:
target:
entity_id: switch.qdl3da90yp_charge_from_grid
This is reactive rather than intelligent — BESS doesn't factor capacity cost into its planning horizon.
Tibber Pulse Integration Opportunity
For users with Tibber Pulse, sensor.tibber_pulse_monthly_peak_hour_consumption provides the current month's highest measured peak. This could feed directly into the optimizer to understand how close the current hour is to setting a new monthly peak — enabling more nuanced decisions.
Impact
With winter effektavgift rates of 145 SEK/kW/month, a single unnecessary 5 kW grid charge during peak hours costs 725 SEK — equivalent to many months of energy cost savings from BESS optimization. For users on capacity tariffs, this feature is arguably more financially impactful than spot price optimization.
Happy to test any implementation and provide feedback from a real SE3 installation with Growatt ARK 15 kWh + MOD 10KTL3-XH + Tibber Pulse.