Component to integrate with the UK Carbon Intensity API.
The UK Carbon Intensity API shows the carbon intensity of the electricity on the UK grid.
The integration finds your nearest "outcode" (first bit of a postcode) from your location, and uses this to get your regional carbon intensity.
If your outcode is not available, it will report the overall UK grid carbon intensity.
This integration may be useful to help you run home automation tasks or devices only when the grid is full of renewable energy.
This component will set up the following platforms.
Platform | Description |
---|---|
binary_sensor |
True if the carbon intensity is low or very low . |
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder calleduk_carbon_intensity
. - Download all the files from the
custom_components/uk_carbon_intensity/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Add
uk_carbon_intensity:
to your HA configuration. - Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "UK Carbon Intensity"
Using your HA configuration directory (folder) as a starting point you should now also have this:
custom_components/uk_carbon_intensity/.translations/en.json
custom_components/uk_carbon_intensity/__init__.py
custom_components/uk_carbon_intensity/binary_sensor.py
custom_components/uk_carbon_intensity/config_flow.py
custom_components/uk_carbon_intensity/const.py
custom_components/uk_carbon_intensity/manifest.json
uk_carbon_intensity:
If you want to contribute to this please read the Contribution guidelines
This project uses a blueprint for Home Assistant custom component repositories.