The UK grid’s carbon intensity is not constant. On a windy spring afternoon when offshore turbines are running hard and demand is low, the grid can drop below 50 gCO₂/kWh. On a cold, still January evening when gas plants are covering peak demand, it can hit 300 gCO₂/kWh or higher. The difference matters — charging your EV during high-intensity periods can produce six times the emissions of charging during low-intensity ones.
This isn’t a marginal consideration. Timing matters, the data is freely available, and the tools to act on it automatically have been built.
How Grid Carbon Intensity Works
The electricity you draw from the grid is a blend of whatever sources are generating at that moment — wind, solar, gas, nuclear, biomass, imports from France and Norway. The carbon intensity of that mix changes continuously as weather conditions shift, demand rises and falls through the day, and generators come on and offline.
National Grid ESO (Electricity System Operator) publishes carbon intensity data in real time via their Carbon Intensity API. It gives you:
- Current grid carbon intensity for Great Britain (gCO₂/kWh)
- Regional breakdown (14 UK regions with separate intensities — the North of Scotland typically runs much lower than the South East, which has less renewable generation nearby)
- 48-hour forecast, updated every 30 minutes
- Historical data going back to 2018
The API is free, documented, and doesn’t require authentication for most endpoints. A simple call to https://api.carbonintensity.org.uk/intensity returns the current national figure. The regional endpoint (/regional/regionid/10 for Yorkshire, for example) gives you local data that’s more accurate for your actual grid connection.
The EV Charging Opportunity
An electric car with a 60kWh battery charged from empty at 200 gCO₂/kWh produces 12kg of CO₂. The same charge at 80 gCO₂/kWh produces 4.8kg. For a typical UK driver charging weekly, the timing choice adds up to over 300kg CO₂ per year — roughly equivalent to a short-haul flight.
The best times to charge in the UK are:
- Overnight (12am–6am): Demand is lowest, peaking plants are largely offline, and overnight wind generation is often high. Grid intensity is structurally lower at night.
- Midday solar window (11am–3pm, April–September): Solar generation peaks, pushing down intensity on sunny days.
- Windy periods at any time: High wind output is the single strongest driver of low carbon intensity. The forecast API helps here.
The times to avoid: 4pm–8pm on weekdays, when domestic demand peaks and grid intensity typically rises.
The Carbon Intensity API in Practice
import requests
def get_current_intensity():
r = requests.get("https://api.carbonintensity.org.uk/intensity")
data = r.json()["data"][0]
return {
"intensity": data["intensity"]["actual"],
"index": data["intensity"]["index"], # "very low", "low", "moderate", "high", "very high"
}
def get_forecast_best_window(hours_ahead=12):
"""Find the lowest intensity window in the next N hours."""
r = requests.get(f"https://api.carbonintensity.org.uk/intensity/pt24h")
periods = r.json()["data"]
return min(
periods[:hours_ahead * 2], # API gives 30-min slots
key=lambda p: p["intensity"]["forecast"]
)
The index field is particularly useful for simple threshold decisions. You can act on “only charge when index is very low or low” without needing to tune a specific gCO₂ number.
Octopus Agile and Time-of-Use Tariffs
The carbon intensity case for timing overlaps strongly with the economic case on time-of-use tariffs. Octopus Energy’s Agile tariff updates pricing every 30 minutes based on wholesale electricity prices — and wholesale prices are lowest when renewable generation is high and demand is low, which is largely the same conditions that produce low carbon intensity.
On an Agile tariff, overnight and daytime off-peak charging isn’t just cleaner — it’s significantly cheaper. During high-wind overnight periods, Agile occasionally goes negative (you’re paid to consume), while peak evening rates can be 30–50p/kWh. The alignment between cheap and clean is not perfect, but it’s strong enough that optimising for one largely gets you the other.
Octopus publishes a free API for Agile customers that gives 24-hour ahead pricing. Combining carbon intensity data with Agile pricing gives you the input to a simple optimisation: charge when both cost and intensity are low.
Smart Home Automation Approaches
EV charger scheduling: Most smart EVSE (Electric Vehicle Supply Equipment) units — Ohme, Myenergi Zappi, Wallbox — have scheduling features and some have direct carbon intensity integration. The Ohme app has supported carbon-aware smart charging since 2024, automatically scheduling overnight charging to target the lowest-intensity windows.
If your charger doesn’t have this built in, it can often be automated via:
- Home Assistant: The
National Grid Carbon Intensityintegration pulls live data. You can write automations that trigger smart plugs or EV charger switches based on intensity thresholds. - IFTTT / n8n: Less granular but easier to set up. Connect the Carbon Intensity API via webhook to control a smart socket.
- Python scripts on a Raspberry Pi: The most flexible approach. Poll the API every 30 minutes, decide whether to enable charging based on thresholds, send commands to a smart socket or charger API.
Other appliances: The same logic applies to any deferrable high-draw appliance — dishwasher, washing machine, tumble dryer, hot water immersion heater. Running a dishwasher at 1am instead of 6pm produces meaningfully fewer emissions over a year.
The Zappi charger supports “Eco Mode” which diverts surplus solar generation to charging before drawing from the grid — useful if you have PV panels and want to maximise self-consumption.
Building a Simple Carbon-Aware Charging Script
import requests
import time
INTENSITY_THRESHOLD = 100 # gCO₂/kWh - charge below this
CHECK_INTERVAL = 1800 # 30 minutes
def should_charge_now():
r = requests.get("https://api.carbonintensity.org.uk/intensity")
intensity = r.json()["data"][0]["intensity"]["actual"]
print(f"Current intensity: {intensity} gCO₂/kWh")
return intensity < INTENSITY_THRESHOLD
while True:
if should_charge_now():
enable_charger() # your charger's API or smart socket control
else:
disable_charger()
time.sleep(CHECK_INTERVAL)
Replace enable_charger() and disable_charger() with calls to your specific charger’s API or a smart socket library like tplink-smarthome-api or the Shelly API.
Regional Accuracy
If you’re in Scotland or Wales, the national intensity figure understates how clean your local grid typically is. Scotland in particular runs predominantly on renewables and has carbon intensity regularly 30–40% below the national average. For regional accuracy, use:
https://api.carbonintensity.org.uk/regional/regionid/{region_id}
Where region IDs range from 1 (North Scotland) to 14 (South East England). Your postcode maps to a region via the /regional/postcode/{postcode} endpoint — the API handles the lookup.
Practical Impact
A UK EV driver who switches to carbon-aware charging — targeting the lowest-intensity windows rather than just plugging in whenever convenient — can realistically reduce charge-cycle emissions by 30–50% annually. Combined with the cost savings from time-of-use tariffs, there’s a meaningful dual incentive that requires minimal behaviour change once the automation is set up.
The technology exists, the data is free, and the integration work is a weekend project at most.