BottlecapDave / HomeAssistant-CarbonIntensity

Unofficial Home Assistant integration based on data supplied by carbonintensity.org.uk
https://bottlecapdave.github.io/HomeAssistant-CarbonIntensity
MIT License
5 stars 0 forks source link

Current carbon intensity #2

Closed dunxd closed 1 year ago

dunxd commented 2 years ago

Hey - just found your repo. I had previously been using your Octopus Energy integration, and was pleased to see more of your work.

I'm not yet ready to use the target sensors, but I would like to use the regional Carbon Intensity figure rather than the national UK one from CO² Signal in my Energy dashboard. Is this possible through this integration?

BottlecapDave commented 2 years ago

Hi there. This integration exposes the regional intensity rating - you set your region upon first creation. I've also just created a new release that exposes the current forecasted intensity rating (it was on my list). This sensor also includes the current 48 hours of forecasted intensity rating in case what's exposed isn't enough.

dunxd commented 2 years ago

Thanks - that is great. I can have a play around with it now 😀

dunxd commented 1 year ago

Hi there. Finally looking at this again. I'm unsure if this is compatible with the figures from CO2 Signal - the CO2 Signal Carbon Intensity sensor currently reports a figure of 85 gCO2eq/kWh for the UK. Your integration is reporting 12 for North West England. What units is this? I also notice that the figure is being treated as text by Home Assistant rather than a number - the history graph doesn't show a line chart - rather a history chart showing duration for each value.

Is your integration designed to be a replacement for CO2 Signal?

BottlecapDave commented 1 year ago

The figure is forcasted gCO2/kWh as per https://carbonintensity.org.uk/, which is supplied by the national grid. I'm not sure what source CO2 signal uses, but it could be either the actual value, or the average across the whole of the UK.

The integrations purpose was more around the target rate sensors so that it could finds the lowest carbon times and turn things on/off through automations. For example, I use it to find the lowest 4 hours each day to charge various batteries via an automation.

I've released an update with the correct unit of measurement and the value reporting back as a number. The lack of line chart is due to how Home Assistant interprets this data as they don't have any device classes that quite fit the available data.

dunxd commented 1 year ago

That's great. I get a line graph now. If only HA allowed using something other than CO2 Signal in the energy dashboard, which lacks any local breakdown for the UK other than the Orkney Islands which is where a lot of wind farm research is done.