About meContact
Guides

How to stop your home battery draining into your EV with Home Assistant

The car is charging on a cheap rate, yet the home battery drops almost as fast as the car fills up. This is one of the most common complaints in homes with a battery, an EV charger and a smart tariff.

In most cases nothing is broken. The inverter does exactly what it was set up to do: it covers the home’s demand from the battery. The problem is that it counts the car as part of the home.

This guide explains why it happens, how to recognise it in your own data and which ways of stopping it exist, from a CT clamp change to logic in Home Assistant. It compares the options and their risks. It is not a copy and paste recipe, because the right control depends on the inverter, the tariff and the charger.

Why does the home battery discharge when the EV charges?

A hybrid inverter in self-use mode tries to keep grid import close to zero. It measures power at the grid connection, usually with a CT clamp or a meter, and discharges the battery to cover whatever the house draws.

If the EV charger sits behind that measuring point, a 7 kW charging session looks like a very large household load. The inverter does not know it is a car. It only sees import and responds by discharging the battery, up to its maximum power.

The typical picture: the charger draws 7 kW, the battery supplies 3 to 5 kW of it and the grid covers only the rest.

This costs money even on a cheap rate. The energy in the battery was stored earlier, often at the same cheap rate or from solar. Moving it into the car during a cheap slot gains nothing. Later, when the rate is high, the battery is emptier and the house buys expensive energy from the grid. Every cycle also loses a few per cent and adds wear.

On a fixed overnight rate the effect can be small. With a tariff that adds cheap slots at other times, it can happen several times a week without anyone noticing.

How to recognise the problem

The quickest check is to look at one charging session in the history graphs, not at daily totals. Look for four signs:

  • battery discharge power rises when the charger starts and falls when it stops;
  • grid import is clearly lower than the charger power;
  • the battery state of charge drops during a cheap charging session;
  • after the session the house imports more than usual in the evening.

The Energy dashboard shows this in hourly bars. A history graph with charger power, battery power and grid power on one chart shows it far more clearly. How to collect these data is covered in the guide Energy in Home Assistant.

If the problem appears in some sessions but not in the regular overnight window, the usual cause is a timed battery setting that covers the fixed cheap hours only. Extra slots from the tariff fall outside it. The next section explains where they come from.

Fixed cheap hours vs extra smart charging slots

Many UK EV tariffs combine a fixed cheap window at night with smart charging controlled by the supplier. The supplier decides when the car charges and can add cheap slots outside the fixed window, based on grid conditions and the time the car must be ready.

Octopus Intelligent Go

Intelligent Octopus Go has a fixed overnight window and can schedule extra charging slots during the day or evening. In those slots the car or charger starts on Octopus’s command. Home Assistant can see planned and active slots through the community Octopus Energy integration, usually as a dispatching sensor.

EDF Smart Charging

EDF offers a similar Smart Charging model next to its GoElectric tariffs. EDF controls a compatible car or charger and can plan charging outside the regular off-peak hours. An unofficial community integration exposes these dispatches in Home Assistant. It depends on EDF’s cloud service, so it needs more care than a local signal.

Agile and other dynamic tariffs

On Agile and other half-hourly or hourly price tariffs no supplier starts the car for you. You, the charger app or a planner such as Predbat choose the slots. That makes coordination easier, because the same system can decide about both the car and the battery.

Why a timed battery schedule is not enough

Most inverters let you set times when the battery may not discharge, or when it charges from the grid. That works well for a fixed window, for example from 23:30 to 05:30.

An extra slot at 14:00 or 19:30 is not in that schedule. Unless something changes the settings in time, the inverter stays in self-use and the battery covers the car.

Keeping the battery permanently at a high minimum level is not a good fix either. It stops discharge into the car, but it also stops the battery from powering the house in the expensive hours, which is the reason you have it.

Three ways to stop the battery draining into the car

There are three broad approaches. They can be combined, but each one solves the problem at a different level.

ApproachHow it worksStrengthsLimits
CT clamp or wiring changeThe inverter stops seeing the chargerWorks without any softwareThe battery never sees the car, also when you want solar to charge it
Predbat and hold for carPredbat holds the battery while the car chargesFits homes that already use PredbatNeeds a reliable signal that the car is charging now
Home Assistant automationLogic reacts to the tariff slot and the charger stateFlexible, can combine several signalsMust be designed, tested and monitored with care

In short: without Home Assistant, a CT clamp change is often enough. With Predbat, start with its own car logic. With an unusual mix of tariff, charger and inverter, or with conflicts between systems, dedicated logic with diagnostics is usually the safest route.

CT clamp and hardware-based control

The inverter’s CT clamp is moved, or the supply is split, so the charger is connected before the inverter’s measuring point. The battery then ignores the car completely.

It is simple and does not depend on any integration. It is also permanent: if you later want surplus solar or the battery to charge the car, the inverter cannot see it. Priorities for surplus energy are covered in the guide Smart PV surplus management. Any wiring change is a job for a qualified electrician.

Predbat and hold-for-car logic

Predbat plans battery charging and discharging from tariff prices, the solar forecast and consumption. When it knows the car is charging, it can hold the battery so it does not discharge into the car. The Predbat documentation describes this both for car slots planned by Predbat and for slots set by an Intelligent Octopus tariff.

Holding works only if Predbat gets a reliable signal that the car is charging now and if its control of the inverter is enabled and correct. With a supplier other than Octopus, or a charger that reports its state late, this is where most problems appear.

Home Assistant automation

The third option is dedicated logic in Home Assistant. It watches the tariff slot and the charger state. When a cheap slot starts and the car is charging, it changes the inverter so the battery stops discharging. When the slot ends, it returns the inverter to the settings it had before.

The idea is simple. A reliable version has to handle what happens between those two moments: a restart of Home Assistant, a slot that ends early, a charger that stops and starts again, or another system that changes the same inverter setting. That is where most of the work is.

Which signals Home Assistant can use

Any solution is only as good as its data. Home Assistant needs to know when a slot starts, whether the car is really charging, and what the battery and inverter are doing.

Tariff: Octopus and EDF

The supplier integration can show planned and active dispatches. This is the earliest signal, sometimes known before the car starts. Both integrations are community projects that use the supplier’s cloud, so data can arrive late or briefly disappear.

EV charger: Hypervolt and others

The charger shows whether the car is connected and charging, and at what power. Hypervolt has a community integration installed through HACS, which uses Hypervolt’s cloud. Other popular chargers, such as Ohme or myenergi zappi, have their own integrations with different delays and features.

Inverter and battery: SolaX, GivEnergy, Sunsynk, FoxESS

For control, the inverter matters most. SolaX, GivEnergy, Sunsynk and FoxESS all have community integrations, often over local Modbus, sometimes through a cloud. What you can read and what you can safely change differs between models and firmware versions. Not every setting that can be written should be written often.

Charger state or tariff slot: which one to trust?

Neither is perfect on its own. A slot can be planned while the car does not charge. The charger can start a few seconds before the slot appears in the integration. Robust logic uses both and decides what to do when they disagree.

Where Predbat fits in

If Predbat already controls your battery, it should also be the place that knows about the car. A separate automation that changes the same inverter settings creates a second controller, and the two will override each other.

In practice there are two sensible routes. Either Predbat gets reliable car charging and slot signals and holds the battery itself, or Predbat stays in a monitoring mode and one dedicated logic controls the inverter. Mixing both without clear rules is a common source of strange battery behaviour.

Risks when Home Assistant controls the battery and inverter

Controlling a battery is not like switching a lamp. A wrong state can cost money for days before anyone notices.

Restoring the previous settings

If an automation stops discharge and never restores it, the battery stays idle during the expensive hours. The logic has to remember what the inverter was doing, restore it after the slot and check that the restore really happened.

Several systems controlling one inverter

The inverter app, the supplier, Predbat, the installer’s schedule and Home Assistant may all try to change the mode. Each one needs a clear role, otherwise the last one to write wins.

Data delays and lost connections

Cloud integrations can report a slot or a charging state late, or drop out for a few minutes. The logic must behave sensibly when a signal is missing, for example by keeping the battery protected until the situation is clear.

Import and power limits

When the battery stops covering the car, the grid carries the whole load. A 7 kW charger together with a cooker, a heat pump or an immersion heater can reach the limit of the main fuse or the import limit of the connection. Some inverters also apply their own import and export limits that interact with the chosen mode.

Fallback and failure conditions

Decide what should happen when Home Assistant restarts, the inverter stops responding or the network fails. A safe fallback usually means returning to the inverter’s normal self-use mode, not leaving it in a forced state.

Testing on the real system

Every installation behaves a little differently. The logic has to be checked on real charging sessions, including those that start at unusual times. Switching modes by hand is not a test. Tracing and testing automations is described in the guide Home Assistant automations.

Can the EV and the home battery charge at the same time?

Often yes, during a cheap slot. The inverter can charge the battery from the grid while the car charges from the same supply. The limits are the capacity of the connection, the inverter’s charging power and its mode. Some inverters need a specific mode or schedule to charge from the grid at all.

Whether it makes sense depends on the price. In a slot as cheap as the overnight rate, topping up the battery at the same time can be worth it. Stopping discharge is the minimum. Charging is a separate decision.

A real example: smart EV charging, SolaX and Hypervolt

One of the systems prepared by HA Expert combines a SolaX X1 Hybrid inverter with a home battery, a Hypervolt charger, Predbat and a UK tariff with extra smart charging slots. This is how it works:

  • an extra cheap slot appears and the car starts charging;
  • left in self-use, the battery could start supplying the car;
  • Home Assistant detects the active slot and the charging state;
  • battery protection starts and the inverter stops discharging into the car;
  • when the slot ends, the previous inverter settings are restored and checked;
  • the whole state is monitored and shown on an energy dashboard, including protection status and possible conflicts.

Further scenarios, such as actively charging the battery during an extra slot, are still being verified on the live system before they become part of the standard solution.

You can see how such a dashboard behaves in the interactive project Energy management and EV charging.

Where should you start?

Before choosing a solution, collect a few facts:

  • the inverter model and how Home Assistant talks to it, locally or through a cloud;
  • the tariff and whether it adds extra charging slots;
  • the charger model and its integration;
  • whether Predbat or another planner already controls the battery;
  • at least one history graph from a session where the battery dropped.

With these facts it is usually clear which of the three routes fits and what has to be checked first.

Need help stopping battery drain?

If your battery drains into the car, or the inverter, charger and tariff do not work together as expected, I can review the data from your system, check which signals are reliable and prepare battery protection with a safe restore and monitoring.

I work remotely with Home Assistant, Predbat and common inverters and chargers.

Ask for a battery and EV check.Tell me your inverter, battery, charger and tariff. The initial assessment is free and without obligation. → click here

Sources and freshness