diff --git a/source/_components/sensor.co2signal.markdown b/source/_components/sensor.co2signal.markdown new file mode 100644 index 00000000000..c8d268db87c --- /dev/null +++ b/source/_components/sensor.co2signal.markdown @@ -0,0 +1,102 @@ +--- +layout: page +title: "CO2Signal" +description: "Instructions on how to use CO2Signal data within Home Assistant" +date: 2019-01-01 21:47 +sidebar: true +comments: false +sharing: true +footer: true +logo: co2signal.png +ha_category: Environment +ha_release: 0.87 +ha_iot_class: "Cloud Polling" +--- + +The `co2signal` sensor platform queries the [CO2Signal](https://www.co2signal.com/) API for the CO2 intensity of a specific region. Data can be collected via latitude/longitude or by country code. This API uses the same data as https://www.electricitymap.org/. Not all countries/regions in the world are supported so please consult this website to check local availability. + +This platform requires a CO2Signal API key, which can be obtained [here](https://www.co2signal.com/). Note that this API key is for personal use only and other options exist when the data is used commercially. + +At the moment, the free CO2Signal API only supports the average carbon intensity of a country and not the marginal carbon intensity. + +

+The "free" API key is limited to a limited number of calls. Too many requests can result in data loss. +

+ +## {% linkable_title Configuration %} + +To set up this platform, get your [API key](https://www.co2signal.com/) and add the following lines to your `configuration.yaml` file: + +```yaml +sensor: + - platform: co2signal + token: YOUR_CO2SIGNAL_API_KEY +``` + +By default, the sensor will use your Home Assistant longitude and latitude. More detailed configurations to overwrite this can be found below. + +{% configuration %} +token: + description: Your CO2Signal API key. + required: true + type: string +latitude: + description: The latitude of the location to monitor. + required: false + type: string + default: "The latitude defined under the `homeassistant` key in `configuration.yaml`." +longitude: + description: The longitude of the location to monitor. + required: false + type: string + default: "The longitude defined under the `homeassistant` key in `configuration.yaml`." +country_code: + description: The country code or region code. + required: false + type: string +{% endconfiguration %} + +To enable the platform and gather data via a specific latitude/longitude, add the following lines to your `configuration.yaml` file: + +```yaml +sensor: + - platform: co2signal + token: YOUR_CO2SIGNAL_API_KEY + latitude: YOUR_LATITUDE + longitude: YOUR_LONGITUDE +``` + +A similar result can be achieved by using the country code. In that case, use the following lines in your `configuration.yaml` file: + +```yaml +sensor: + - platform: co2signal + token: YOUR_CO2SIGNAL_API_KEY + country_code: YOUR_COUNTRY_CODE +``` + +## {% linkable_title Example Configurations %} + +Configuration using custom latitude and longitude: + +```yaml +sensor: + - platform: co2signal + token: YOUR_CO2SIGNAL_API_KEY + latitude: 55.4 + longitude: 5.5 +``` + +Configuration using a country code: + +```yaml +sensor: + - platform: co2signal + token: YOUR_CO2SIGNAL_API_KEY + country_code: BE +``` + +## {% linkable_title Sensor Types %} + +When configured, the platform will create one sensor for each configured location. + diff --git a/source/images/supported_brands/co2signal.png b/source/images/supported_brands/co2signal.png new file mode 100644 index 00000000000..32879acab9d Binary files /dev/null and b/source/images/supported_brands/co2signal.png differ