Storm reserve: pre-charge the battery and shed discretionary loads
When a wind warning or a grid-frequency excursion is detected, the battery is charged to 95 %, discretionary loads are shed, and the reserve floor is raised from 20 % to 60 % so a 6-hour outage does not leave the house dark.
# HearthNodes recipe 20 - storm reserve
alias: "Energy - storm reserve arms and sheds"
id: hn_energy_storm_reserve
description: "Raise the reserve floor to 60 percent, shed discretionary loads"
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id: binary_sensor.storm_warning
to: "on"
- platform: numeric_state
entity_id: sensor.grid_frequency
below: 49.8
for: "00:00:30"
id: freq_low
- platform: numeric_state
entity_id: sensor.grid_frequency
above: 50.2
for: "00:00:30"
id: freq_high
variables:
reserve_floor_pct: 60
charge_target_pct: 95
shed_order:
- switch.pool_pump
- number.ev_charger_current
- switch.immersion_element
- climate.heating
condition:
- condition: state
entity_id: binary_sensor.grid_connected
state: "on"
- condition: numeric_state
entity_id: sensor.battery_soc
above: 30
- condition: state
entity_id: input_boolean.inverter_maintenance
state: "off"
action:
- service: number.set_value
target:
entity_id: number.battery_reserve_floor
data:
value: "{{ reserve_floor_pct }}"
- service: switch.turn_off
target:
entity_id:
- switch.pool_pump
- switch.immersion_element
- service: number.set_value
target:
entity_id: number.ev_charger_current
data:
value: 6
- service: switch.turn_on
target:
entity_id: switch.battery_grid_charge
data:
power_w: 3000
until_soc: "{{ charge_target_pct }}"
- service: light.turn_on
target:
entity_id:
- light.stair_emergency
- light.hall_emergency
data:
brightness_pct: 15
- service: script.arm_emergency_circuit
data:
circuits: [light.stair_emergency, light.hall_emergency]
# Disarm when the warning expires and either 24 hours have passed or the grid
# frequency has been nominal for 6 hours. A brief frequency dip alone must not
# change the house's operating mode for a day, hence the 30 second confirmation.
Trigger · state
binary_sensor.storm_warning
A severe weather warning is issued for the area, or grid frequency leaves 49.8–50.2 Hz for more than 30 seconds.
Step-by-step
- number.battery_reserve_floorRaise the reserve floor from 20 % to 60 %, which makes the inverter charge rather than discharge until the floor is met.
set 60 % - switch.water_heater · number.ev_charger_current · switch.pool_pumpShed the immersion heater, EV charging and the pool pump — the three loads that would drain the battery fastest in an outage.
shed - switch.battery_grid_chargeCharge from the grid at 3 kW during the cheap night window rather than waiting for solar the next morning.
turn_on · 3 kW until 95 % - light.stair_emergency · light.hall_emergencyArm the emergency lighting circuit so it will run on the battery-backed circuit if the grid drops.
arm · on battery only
Raise the floor, do not just charge to full
Charging to 95 % and leaving the floor at 20 % means the house starts discharging as soon as the sun goes down, and by the time the storm hits at 22:00 the battery is back at 40 %. Raising the floor to 60 % is what actually holds the energy in place. It also prevents an unnecessary deep discharge afterwards.
Shed in a fixed order and write it down
An outage that is longer than expected needs a defined shedding order, not an improvised one. Pool pump first (no harm), then EV, then immersion, then heating, and never the fridge, freezer, network or medical circuits. Put the order in a documented list the household can read.
Test the reserve once a quarter, on purpose
Set the floor to 60 %, disconnect the grid, and see which circuits actually stay up. Every quarter, something has been added to a backed-up circuit that should not be there — a new freezer, a second network switch, a space heater. A reserve that has never been tested is a guess.
Hardware
| Model | Protocol | Link | Role in this chain |
|---|---|---|---|
| Hybrid inverter with a settable reserve floor | matter |
wired | The reserve floor is the lever here; an inverter without a settable floor cannot implement this recipe at all. |
| Grid frequency sensor (or inverter-reported frequency) | modbus · wired |
wired | Frequency deviation is an early warning that the grid is under stress, typically 30–90 seconds before a supply interruption in that area. |
| Severe weather warning feed | wifi |
wired | Provides 6–12 hours of lead time for wind and flood warnings, which is far more useful than frequency deviation alone. |
When it fails
If the weather feed is unavailable, the frequency-based trigger still arms the reserve, with less lead time. If the battery does not reach the 60 % floor before the storm arrives, the recipe sheds loads in a defined order — pool pump, EV, immersion, then heating — so the critical circuits stay powered for the longest possible time.