← Living Off Grid

How Home Assistant Referees EV Charging, Slab Heating and the House Battery Off-Grid

Illustration of Home Assistant balancing EV charging, heat pump and household loads against solar and battery supply
Illustration, not our actual numbers.

We live off-grid in rural Maine. The main house runs on EG4 inverters and about 100 kWh of EG4 LiFePO4 batteries, fed by three PV strings (a ground mount, a gambrel roof and a vertical wall array). The house is heated by a Mitsubishi Ecodan air-to-water heat pump feeding a radiant slab through a buffer tank. And our EV, a Kia we call Evie, charges from a Grizzl-E charger set to 24 A (about 5.9 kW).

In winter, those three things fight over the same limited sunshine. This post explains how we got Home Assistant (HA) to referee that fight automatically.

The three competing goals

  1. Keep the house battery healthy.  The batteries have to carry us through the night. For us, the true daily low point is around 8:30 AM, just before a ridge and tree line stop shading the panels. Everything else is negotiable; this isn’t.
  2. Keep the EV ready to drive.  Evie normally charges to an 80% limit.
  3. Store surplus sun as heat.  A concrete slab is a huge, cheap thermal battery. On a sunny day, “supercharging” it by running the heat pump hotter than normal means less non-solar heat is needed that night and the next day.

The EV, or storage of excess energy as heat in the slab, left alone, will happily eat all the solar. The trick is to balance these with normal household energy use and available solar energy.

The pecking order

Two manual overrides sit on top:  A “charge Evie now regardless of heating” switch, and a one-tap “charge Evie to 100%” script for trip days ahead of bad weather. That script pauses solar logic, charges at full power, and puts the 80% limit and automatic solar charging back when the car is unplugged.

The numbers that drive it

Forecast.  The Open-Meteo Solar Forecast integration gives per-string production forecasts, refreshed every 30 minutes. We trust only 80% of what it promises, to cover charging losses and forecast optimism.

Spare solar today.  One HA template sensor answers “how much energy can I give away today?” It takes forecast PV remaining (× 0.8), subtracts the energy needed to refill the house battery, subtracts the house’s other loads (15-minute average × hours until sunset), and keeps a 5 kWh reserve. A second sensor subtracts what Evie still needs; that remainder is the slab’s budget.

Seven-day outlook.  A dashboard card we call “The Big Question” projects the battery’s 8:30 AM level for each of the next seven days. If a gray stretch is coming, it’s obvious at a glance whether we can afford to spend energy today.

How Evie charges

The charger runs at one of six levels:  Off, 8, 12, 16, 20 or 24 A (about 0.245 kW per amp). In daylight:

Overnight, Evie can charge from the house battery at 24 A, but only if the next day’s forecast is strong (60 kWh or more) and the battery starts at 80% or above. It stops at 70%.

A hard-won lesson on control:  Don’t depend on cloud services to start and stop charging. We moved the Grizzl-E off the manufacturer’s cloud and onto HA’s own OCPP integration, so start/stop and current limits happen on the local network in seconds. We use the car’s cloud connection only to read its state of charge and set its charge limit, never to start or stop charging. A car-side “stop” can leave the car refusing power until it’s re-plugged, which defeats the whole scheme. The charger’s DIP switches remain the hardware ceiling; software can only go lower.

How the slab gets supercharged

Every 5 minutes in daylight, HA checks whether to start a slab session. It needs all of these:  The house battery above 60%, a heating zone below 70°F, batteries averaging more than 4 kW of charging over 15 minutes (or already full), and more than 5 kWh of forecast spare solar after the battery is refilled. Evie’s charging is added back into the battery reading so the EV’s draw doesn’t hide real surplus. She has her own share of the budget.

When a session starts, HA raises the Foyer and Garage thermostats to 70°F and raises the Ecodan’s flow temperature from 95°F to 109°F. The Garage zone is staged so the buffer tank heats first, then opens to the slab.

The session ends if the battery falls below 60%, if the batteries drain more than 2 kW for 10 minutes, or 45 minutes before sunset. While the battery is below 95%, it also ends if the batteries stop charging, the spare-solar forecast goes negative, or (after noon) PV drops below 3 kW. Above 95% those last checks are ignored on purpose. When the battery is full, the inverters throttle PV down to match the load, so “low PV” there means “plenty of sun with nowhere to go,” not “clouds.” A safety-net automation resets all thermostats to normal 40 minutes before sunset, in case a session was interrupted.

For more on the slab side, including the studio’s buffer-tank version, see Supercharging a Radiant Slab with Off-Grid Solar.

What we’ve learned

None of this needs exotic hardware, just Home Assistant, a solar forecast, an OCPP-capable charger and a few well-thought-out template sensors. Happy to share more detail with anyone building something similar.