Site updated at 2018-01-25 17:33:45 UTC

This commit is contained in:
Travis CI 2018-01-25 17:33:45 +00:00
parent 2a429df2b2
commit 94552b64db
144 changed files with 304 additions and 301 deletions

View file

@ -75,7 +75,7 @@
</header>
<hr class="divider">
<p>The <code class="highlighter-rouge">london_air</code> component <a href="http://api.erg.kcl.ac.uk/AirQuality/Hourly/MonitoringIndex/GroupName=London/Json">queries</a> the London air quality <a href="https://www.londonair.org.uk/LondonAir/API/">data feed</a> provided by Kings College London. A single sensor will be added for each <code class="highlighter-rouge">location</code> (<a href="https://en.wikipedia.org/wiki/List_of_London_boroughs">local authority district or borough</a>) specified in the configuration file. The state of each sensor is the overall air quality in that borough. Note that only 28 of the 32 boroughs have data available.</p>
<p>Boroughs can have multiple monitoring sites at different geographical positions within the borough, and each of those sites can monitor up to six different kinds of pollutant. The pollutants are described <a href="http://api.erg.kcl.ac.uk/AirQuality/Information/Species/Json">here</a> and are Carbon Monoxide (<a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsCO.aspx">CO2</a>), Nitrogen Dioxide (<a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsNO2.aspx">NO2</a>), Ozone (<a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsO3.aspx">O3</a>), Sulphur Dioxide (<a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsSO2.aspx">SO2</a>), PM2.5 &amp; PM10 <a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsPM.aspx">particulates</a>. The <code class="highlighter-rouge">latitude</code> and <code class="highlighter-rouge">longitude</code> of each site is accessible through a <code class="highlighter-rouge">data</code> attribute of the sensor, as are details about the pollutants monitored at that site. The <code class="highlighter-rouge">sites</code> attribute of a sensor displays how many monitoring sites that sensor covers. The <code class="highlighter-rouge">updated</code> attribute of a sensor states when the data was last published. Nominally data is published hourly, but in my experience this can vary. To limit the number of requests made by the sensor, a single API request is made every 30 minutes.</p>
<p>Boroughs can have multiple monitoring sites at different geographical positions within the borough, and each of those sites can monitor up to six different kinds of pollutant. The pollutants are described <a href="http://api.erg.kcl.ac.uk/AirQuality/Information/Species/Json">here</a> and are Carbon Monoxide (<a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsCO.aspx">CO2</a>), Nitrogen Dioxide (<a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsNO2.aspx">NO2</a>), Ozone (<a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsO3.aspx">O3</a>), Sulfur Dioxide (<a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsSO2.aspx">SO2</a>), PM2.5 &amp; PM10 <a href="http://www.londonair.org.uk/LondonAir/guide/WhatIsPM.aspx">particulates</a>. The <code class="highlighter-rouge">latitude</code> and <code class="highlighter-rouge">longitude</code> of each site is accessible through a <code class="highlighter-rouge">data</code> attribute of the sensor, as are details about the pollutants monitored at that site. The <code class="highlighter-rouge">sites</code> attribute of a sensor displays how many monitoring sites that sensor covers. The <code class="highlighter-rouge">updated</code> attribute of a sensor states when the data was last published. Nominally data is published hourly, but in my experience this can vary. To limit the number of requests made by the sensor, a single API request is made every 30 minutes.</p>
<p>To add sensors to Home-assistant for all possible areas/boroughs add the following to your <code class="highlighter-rouge">configuration.yaml</code> file:</p>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry for a single sensor</span>
<span class="s">sensor</span><span class="pi">:</span>