A bidirectional EV can do far more than charge when electricity is cheap and discharge when it is expensive. The real value appears when those decisions happen reliably, around your household routine and without compromising the next journey. Learning how to automate V2G dispatch with Home Assistant is therefore less about creating a clever dashboard and more about building a disciplined energy plan for a mobile battery.

For a solar-equipped home, the opportunity is clear. Surplus generation can be stored rather than exported at a low rate; the vehicle can support the home through an expensive evening peak; and the system can stop discharging before the battery reaches the reserve needed for driving. Done well, automated dispatch reduces peak demand, increases the useful share of self-generated solar, and gives the grid flexible capacity when it needs it most.

Start with the physical V2G stack

Home Assistant does not make an EV bidirectional. It orchestrates equipment that already supports controlled charge and discharge. Before building automations, confirm that your vehicle, bidirectional charger, electrical installation and energy retailer or network arrangements are compatible with the V2G or V2H use case you want.

This distinction matters. A charger may be capable of exporting power technically while its installed configuration, firmware, metering arrangement or local approval only permits charging. Some systems support backup power during an outage but not normal grid export. Others can respond to a charge or discharge setpoint but cannot expose that control locally to Home Assistant.

Your core system normally needs a compatible EV, a bidirectional EVSE, revenue-grade or suitably accurate site metering, and a control pathway. That pathway may be a local integration, a manufacturer API, Modbus, OCPP, MQTT, or a vendor-supported energy management interface. Prefer local control where it is available: it reduces dependence on cloud availability and can provide faster, more transparent status feedback.

Australian and New Zealand installations also need to meet applicable electrical, network and export requirements. Engage an accredited installer and confirm settings with the equipment provider. Home Assistant should issue high-level requests, not replace the charger’s built-in protections, anti-islanding behaviour, current limits or network compliance functions.

Define what successful V2G dispatch means

A common mistake is to automate from price alone. The highest tariff may look like the obvious moment to discharge, but exporting then may leave the car short for a morning drive, trigger an unfavourable demand charge, or cycle the battery for a small financial return.

Set the operating objectives in order. For most households, mobility comes first, followed by resilience, bill reduction, solar self-consumption and grid participation. The order can change. A household with a critical-load backup arrangement may place resilience above arbitrage during storm season. A fleet vehicle with predictable depot return times may prioritise programme revenue during weekday peaks.

Translate those objectives into measurable rules. You need at least a minimum state of charge, an expected departure time, a target charge level at departure, a maximum discharge power, and a clear definition of when grid import is considered expensive. If the charger reports battery state of charge slowly or only through the vehicle cloud service, allow a generous buffer rather than relying on a precise last-minute calculation.

A useful starting point is to reserve 40 to 60 per cent state of charge, then adjust it to your driving pattern. If tomorrow’s trip requires 25 kWh and your usable battery capacity is 60 kWh, your reserve must account for that trip, a contingency margin and any expected battery or charging losses. The automation should protect that reserve even if a price event or solar forecast changes.

Build the data model in Home Assistant

Reliable dispatch depends on reliable inputs. Begin by exposing the data you can trust, then test each entity over several days before letting it command power.

At minimum, create entities for EV state of charge, plug status, charging state, charger power, house grid import or export, solar generation, home load and the current tariff. Add a departure-time helper and a minimum-state-of-charge helper so that household needs can change without editing automation logic.

Forecast data improves decisions, but it should not become a single point of failure. A solar forecast can help the system defer charging until midday, while a price forecast can identify a likely evening discharge window. If either feed becomes unavailable, fall back to a safe schedule: maintain the mobility reserve and avoid discretionary discharge.

It is also worth separating measurements from commands. For example, `sensor.ev_soc` should report battery state, while `number.v2g_power_setpoint` represents a requested charger setpoint. This makes it easier to inspect what the system believed, what it asked for, and what actually happened. That visibility is essential when diagnosing missed dispatch events.

Use a simple control state

Instead of allowing multiple automations to issue conflicting commands, create one operating mode, such as `idle`, `charge_solar`, `charge_off_peak`, `discharge_peak`, `reserve_charge`, and `fault`. Every automation can set the mode, but one central script should translate the mode into charger instructions.

This avoids a familiar problem: a tariff automation requests discharge while a solar automation requests charging, causing the EVSE to switch repeatedly. Add a minimum run time and a deadband around your import threshold. If house load changes by a few hundred watts, the system should not chase every fluctuation.

How to automate V2G dispatch with Home Assistant

The first working version should be conservative. Automate charging in low-cost periods and solar-surplus periods first. Once those actions are consistently correct, introduce peak discharge with strict eligibility checks.

A practical peak-dispatch rule might be: discharge only when the EV is connected, the battery is above its dynamic reserve, the current tariff is in the peak band, home import exceeds 1 kW for five minutes, and no departure is scheduled within the next eight hours. Set a modest discharge limit initially, perhaps enough to cover the household’s typical evening load rather than exporting at the charger’s maximum rating.

The logic can be expressed clearly in pseudocode:

“`yaml if ev_connected and tariff == peak and ev_soc > dynamic_reserve and grid_import > 1.0kW for 5 minutes and hours_to_departure > 8: set_mode: discharge_peak else if ev_soc 1.5kW and ev_soc < target_soc: set_mode: charge_solar else: set_mode: idle “`

The numbers are examples, not universal settings. A home with a 6.6 kW solar array, electric hot water and a high evening load will need different thresholds from a flat with limited solar and a time-of-use tariff. The point is to make each decision explainable.

For variable or wholesale tariffs, do not simply discharge at every high-price interval. Compare the expected saving against battery cycling, conversion losses and the possibility that a higher-priced interval is still ahead. If a 7 kWh discharge avoids 7 kWh of peak import, the financial result depends on the import rate, charging cost, round-trip efficiency and any export revenue. A simple savings sensor in Home Assistant can make this visible rather than assumed.

Add safeguards before enabling unattended operation

V2G automation should fail safe. If data is stale, the EV disconnects, charger status is unknown, or the integration reports an error, command idle and notify the household. Do not keep re-sending a discharge command to a device that has stopped responding.

Use a daily charge floor as well as a departure-based reserve. Departure times are easy to forget to update, while a baseline floor protects against unexpected trips. Add a manual override that pauses automation for a chosen period, such as when preparing for a long drive or expecting an outage.

Keep notifications purposeful. Alert on a failed reserve charge, an unexpected stop, a charger fault, or a dispatch event that reaches its planned energy limit. A notification for every small mode change becomes background noise and will be ignored.

Finally, test in stages. Watch charging-only automation for a week, then trial discharge during one controlled evening window. Compare Home Assistant’s energy records with your meter and charger data. Check that the EV reaches its morning target under cloudy conditions and after a missed schedule. Real-world V2G integration earns trust through observed behaviour, not a promising flow diagram.

Treat your EV as an energy asset, not a fixed battery

A good Home Assistant setup responds to the life of the household. It knows that a vehicle arriving early with excess solar available is different from one returning late before a long motorway trip. It recognises that a grid-support event may be worthwhile one day and inappropriate the next.

That is the practical case for automated V2G dispatch. Your vehicle remains ready to move, while its unused capacity can reduce peak demand, support renewable energy use and give you greater control over electricity costs. Start with clear reserves, prove each command path, and expand the automation only when the evidence says it is working as intended.

Share this post

Subscribe to our newsletter

Keep up with the latest blog posts by staying updated. No spamming: we promise.
By clicking Sign Up you’re confirming that you agree with our Terms and Conditions.

Related posts