EV charging that yields to the oven without stranding the car
The charger modulates from 6 A to 16 A to hold total house load under the 63 A main fuse, pausing rather than stopping when the oven or dryer starts, and guarantees 40 % charge by 07:00 whatever the household does.
# HearthNodes recipe 18 - EV charging that yields to the oven
alias: "Energy - EV charging modulates under the main fuse"
id: hn_energy_ev_load_shed
description: "Clamp total house current, pause rather than stop, honour departure"
mode: restart
max_exceeded: silent
trigger:
- platform: numeric_state
entity_id: sensor.house_total_current
above: 45
for: "00:00:15"
id: shed
- platform: numeric_state
entity_id: sensor.house_total_current
below: 30
for: "00:00:30"
id: restore
variables:
fuse_a: 63
control_target_a: 45
shed_threshold_a: 52
restore_threshold_a: 34
min_charge_a: 6
max_charge_a: 16
headroom_a: "{{ control_target_a - states('sensor.house_total_current') | float(0) }}"
wanted_a: "{{ [[headroom_a, min_charge_a] | max, max_charge_a] | min | round(0) }}"
condition:
- condition: state
entity_id: binary_sensor.ev_plugged_in
state: "on"
- condition: state
entity_id: input_boolean.charger_manual_pause
state: "off"
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.house_total_current
above: "{{ shed_threshold_a }}"
for: "00:00:30"
sequence:
- service: switch.turn_off
target:
entity_id: switch.charger_session
- delay: "00:00:30"
- service: switch.turn_on
target:
entity_id: switch.charger_session
data:
note: "pause keeps the session alive; resume in seconds"
- conditions: []
sequence:
- service: number.set_value
target:
entity_id: number.charger_current
data:
value: "{{ wanted_a }}"
- service: script.assert_departure_floor
data:
departure: "{{ states('input_datetime.ev_departure') }}"
minimum_soc: 40
# the floor overrides load shedding when the car cannot otherwise leave
# Current transformer loss -> fixed 10 A, which is safe alongside an oven and a
# dryer on a 63 A supply. Shed at 52 A, restore only below 34 A with a 60 second
# dwell, otherwise the charger and the oven trade places every minute.
Trigger · numeric_state
sensor.house_total_current
Total house current exceeds 45 A, or falls below 30 A.
Step-by-step
- number.charger_currentModulate the charging current in whole amps, recomputed every 15 seconds, never below the 6 A minimum the standard requires for a valid charging session.
set · clamp(computed, 6 A, 16 A) - switch.charger_sessionPause rather than stop when the dryband would otherwise be exceeded; pausing keeps the session alive so charging resumes automatically.
pause when house current > 52 A for 30 s - number.charger_currentRamp back up one amp every 30 s after a shed, so the system does not oscillate and the fuse never sees a step change.
ramp up 1 A per 30 s - sensor.ev_energy_addedLog whether the 07:00 minimum charge was met each night, so the deadline logic can be tuned from evidence.
log · deadline compliance
Leave headroom below the fuse rating
A 63 A fuse does not blow at 63 A; it blows after minutes of overload, which means a naive controller can run at 62 A all evening and then fail when the kettle joins in. Setting the control target at 45 A and the shed threshold at 52 A leaves room for a 10 A kettle step without any reaction time.
Pause, never stop
Stopping a session ends the handshake and requires the vehicle to renegotiate, which can take a minute and, on some cars, will not restart unattended. Pausing keeps the pilot signal alive and charging resumes in seconds. Use the pause command for all load-shed events.
Guarantee a minimum charge by the departure time
Load shedding that ignores the departure time eventually strands someone. Compute the amps needed to reach the minimum charge by 07:00, and treat that as a floor that load shedding cannot go below — instead, shed the dryer or accept a higher fuse draw.
Hardware
| Model | Protocol | Link | Role in this chain |
|---|---|---|---|
| Mode 3 charger with an OCPP or local API current setpoint | wifi |
wired | Must accept a current setpoint in amps; a charger that only offers start/stop cannot modulate and will trip the fuse. |
| Whole-house current transformer on the main tails | wifi |
wired | Reads total import at the main tails; a circuit-level meter misses the oven's contribution. |
| Solar inverter with export metering (optional) | matter |
wired | Allows charging to follow PV surplus during the day, which is a separate recipe but shares this hardware. |
When it fails
If the current transformer stops reporting, the charger drops to a fixed 10 A, which is safe on a 63 A supply with an oven and a dryer running, and a notification says the dynamic control is offline. If the charger loses communication while at 16 A, the vehicle's own pilot signal limits the session at the last commanded value; the household is told to pause it manually.