Support for thirdparty grid carbon footprint

As the new energy feature has been added it’d be nice if energy providers could hook into the Grid carbon footprint option as so far I only see hardcoded support for CO2 Signal.

For example my energy provider Amber energy ensures we offset our entire CO2 footprint so it’d be nice if we could set that.

Giving this a bump and a vote! I’ve recently discovered our regional power network (Western Power Distribution in the UK) has an API that gives a substation-level mix of the energy being supplied and carbon intensity.

Right now, my local energy mix from the grid is 99.7% solar and has a carbon intensity of just 0.32g/kWh vs the 169g/kWh being reported by electricityMap for the whole of Great Britain.

It would be great if the Energy dashboard was able to support sensors, other than the co2signal integration, where it could take the intensity and fossil fuel percentage values - whether fixed or set - from other sources.

1 Like


I think there are two aspects being requested here.

(a) Offsetting and (b) other “CO2Equiv intensity measures” being added in.

I’ve just coded up some changes to the energy pages that will allow tracking of emissions, offsets and avoided emissions. See this other thread:

The offset aspect is relatively simple configuration change. I just added a percentage offset configuration for a “grid interface” import or export. That will cover the Amber “Greenpower” offsetting use case I believe.

The use of other sensors in addition to CO2 Signal would also be relatively straight-forward. The sensor is essentially just a carbon intensity measure (gCO2Eq / kWh) and a “percent non-fossil”. As long as the sampling looked like a CO2 Signal then that is easy to integrate as an alternative. If someone can point me to another intensity sensor I can make the changes to select it as an alternative to CO2 Sensor.

I also think that it might be good to try and get the ElectricityMap CO2 Signal feed to do better localisation of its feed. For example I can get an Australian total or a better breakdown for my state AU-NSW (coming from OpenNEM here in Australia). It might be possible to convince someone at WesternPower to share that localised information back in to CO2Signal. Someone already dod the Orkney islands separately. See electricityMap | Live 24/7 CO₂ emissions of electricity consumption.

I am going to keep refining my solution for augmenting the energy dashboards with emissions for the next few weeks and then open a PR and see how we can get it merged back to main.

I’d love any feedback.


1 Like

Did you mange to get any further with that pull request and merging this into main?

It seems a logical progression for Ha where APIs are becoming more available for countries or smaller regions.

I have been looking at working around this issue and am stumped by the lack of manipulation of the total_increasing state for CO2 eq weight.

Do you think potentially a addon may be better for integration if the PR to main is denied?

I paused this. I ended up tracking my emissions externally to HA for the main part.

HA just isn’t great as an accounting/entry tool.

I do real time scope 1/2 emissions from my grid use (and “public grid” for highway DC chargers) in HA.

Looks like this:

We use our battery to charge from our rooftop PV or if that won’t fill it to pull green/clean energy from the grid in the middle of the day. We then displace dirty grid energy in the evening. That is tracked in near real time based on import/export and CO2 intensity.

We then keep those numbers for daily tracking and lifetime of the house.

Those are then inputs to an external spreadsheet where we can track our scope 3 emissions from our other purchases.

I think an add-on that would help on the scope 3 emissions tracking (and calculations) would be good to then resurrect my effort here and try and pull this back in to the main dashboards (my gut is it should be a separate dashboard to energy - but related called emissions or environmental impact).