{"id":2477,"date":"2023-03-13T08:10:51","date_gmt":"2023-03-13T13:10:51","guid":{"rendered":"https:\/\/lab.rapternet.us\/?p=2477"},"modified":"2023-02-17T17:52:10","modified_gmt":"2023-02-17T23:52:10","slug":"the-indoor-air-quality-uk-hacs-integration-and-sensor","status":"publish","type":"post","link":"https:\/\/lab.rapternet.us\/?p=2477","title":{"rendered":"The Indoor Air Quality (UK) HACS Integration and Sensor"},"content":{"rendered":"\n<p>Now that I have a number of AirGradient sensors around my house, I have all sorts of data I can make use of about the air quality inside it. I now have to figure out how to make use of all that data. Creating a single unified data point for general air quality based on the AirGradient data is the first thing I&#8217;m going to do. To do this, I&#8217;ll make use of the IAQUK HACS integration.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">The AirGradient Saga<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/lab.rapternet.us\/?p=2219\" data-type=\"URL\" data-id=\"https:\/\/lab.rapternet.us\/?p=2219\" target=\"_blank\" rel=\"noreferrer noopener\">Making the AirGradient DIY<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/lab.rapternet.us\/?p=2392\" data-type=\"URL\" data-id=\"https:\/\/lab.rapternet.us\/?p=2392\" target=\"_blank\" rel=\"noreferrer noopener\">Adding an LPS22 to AirGradient and Building a Custom Sensor in EspHome<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/lab.rapternet.us\/?p=2377\" data-type=\"URL\" data-id=\"https:\/\/lab.rapternet.us\/?p=2377\" target=\"_blank\" rel=\"noreferrer noopener\">Adding TVOC to the AirGradient<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/lab.rapternet.us\/?p=2477\" data-type=\"URL\" data-id=\"https:\/\/lab.rapternet.us\/?p=2477\" target=\"_blank\" rel=\"noreferrer noopener\">The Indoor Air Quality (UK) HACS Integration and Sensor<\/a><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Parts<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>AirGradient with Esphome<\/li>\n\n\n\n<li>HACS installed<\/li>\n\n\n\n<li>Iaquk HACS integration installed<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring it<\/h2>\n\n\n\n<p>Configuring the sensors is pretty straight forward. Since the integration can make use of LOTS of different air quality metrics, we can put pretty much all of our AirGradient&#8217;s sensors into the configuration to give a good accurate output.<\/p>\n\n\n\n<p>The integration only supports one temperature and CO2 sensor though, so my additional sensors won&#8217;t be bringing anything here.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">iaquk:<br>  studio:<br>    name: \"Studio\"<br>    sources:<br>      temperature: sensor.temperature<br>      humidity: sensor.humidity<br>      co2: sensor.eco2<br>      tvoc: sensor.tvoc<br>      pm:<br>        - sensor.particulate_matter_1_0um_concentration<br>        - sensor.particulate_matter_10_0um_concentration<br>        - sensor.particulate_matter_2_5um_concentration<br>    sensors:<br>      - iaq_level<br>      - iaq_index<br><br>  livingroom:<br>    name: \"Living Room\"<br>    sources:<br>      pm:<br>        - sensor.particulate_matter_10_0um_concentration_3<br>        - sensor.particulate_matter_1_0um_concentration_3<br>        - sensor.particulate_matter_2_5um_concentration_3<br>      temperature: sensor.temperature_3<br>      humidity: sensor.humidity_3<br>      co2: sensor.senseair_co2_value_3<br>      tvoc: sensor.tvoc_2<br>    sensors:<br>      - iaq_level<br>      - iaq_index<br><\/pre>\n\n\n\n<p>My full configuration is below for the two AirGradients that I have deployed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"831\" height=\"848\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-8.png\" alt=\"\" class=\"wp-image-2502\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-8.png 831w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-8-294x300.png 294w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-8-768x784.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">Home Assistant YAML Configuration<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Data Displays<\/h2>\n\n\n\n<p>By default, the iaquk integration adds two outputs to home assistant, a value for the air quality index and a status for that value (complete with emoji representation too). Examples of this are below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"555\" height=\"122\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-6.png\" alt=\"\" class=\"wp-image-2500\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-6.png 555w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-6-300x66.png 300w\" sizes=\"auto, (max-width: 555px) 100vw, 555px\" \/><figcaption class=\"wp-element-caption\">Indoor Air Quality from one AirGradient<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"129\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-7.png\" alt=\"\" class=\"wp-image-2501\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-7.png 567w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-7-300x68.png 300w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><figcaption class=\"wp-element-caption\">Indoor Air Quality from the second AirGradient<\/figcaption><\/figure>\n\n\n\n<p>I decided to add some gauges to show the values in a way that would give me a good idea how good or bad the air quality was. I do like some good data visualizations and gauges. I used some references from the integration itself to determine the value points for changing the status and picked some color hex values using an online tool.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">type: gauge<br>entity: sensor.unnamed_device_2<br>segments:<br>  - from: 0<br>    color: '#8c241c'<br>  - from: 26<br>    color: '#eda12f'<br>  - from: 39<br>    color: '#f5f540'<br>  - from: 52<br>    color: '#8fcf21'<br>  - from: 61<br>    color: '#2a9c24'<br>name: Studio Indoor Air Quality Index<br><\/pre>\n\n\n\n<p>This produced the gauges below. These looked pretty good, but in the gauge documentation, I saw that I could display them differently.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"393\" height=\"349\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-9.png\" alt=\"\" class=\"wp-image-2506\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-9.png 393w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/01\/image-9-300x266.png 300w\" sizes=\"auto, (max-width: 393px) 100vw, 393px\" \/><figcaption class=\"wp-element-caption\">IAQ Gauge without Needle<\/figcaption><\/figure>\n<\/div>\n\n\n<p>The gauges work well with the colors, however it&#8217;s still not super clear the variance between the different values. In the card settings, there is an option to turn in the needle, which helps clear all of that up.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"185\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/02\/image.png\" alt=\"\" class=\"wp-image-2514\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/02\/image.png 456w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/02\/image-300x122.png 300w\" sizes=\"auto, (max-width: 456px) 100vw, 456px\" \/><figcaption class=\"wp-element-caption\">IAQ Gauge with Needle<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>I liked the final results from this. It gives me some good visuals for the air quality that&#8217;s quick to glance at and read. It can also be used to easily trigger automations based off the entire index rather than individual values. I would however love to have this value built into my AirGradients and output from there (maybe a future project?)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/Limych\/ha-iaquk\">GitHub for the IAQ UK integration<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.airnow.gov\/aqi\/aqi-basics\/\">AirNow Air Quality Resources<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Now that I have a number of AirGradient sensors around my house, I have all sorts of data I can make use of about the air quality inside it. I now have to figure out how to make use of all that data. Creating a single unified data point for general air quality based on &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/lab.rapternet.us\/?p=2477\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The Indoor Air Quality (UK) HACS Integration and Sensor&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2514,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[85,84,39,49],"class_list":["post-2477","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","tag-air-sensors","tag-airgradient","tag-home-assistant","tag-smart-home"],"_links":{"self":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/2477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2477"}],"version-history":[{"count":17,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/2477\/revisions"}],"predecessor-version":[{"id":2764,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/2477\/revisions\/2764"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/media\/2514"}],"wp:attachment":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}