/ha-iaquk

Indoor Air Quality Sensor Component for Home Assistant

Primary LanguagePythonMIT LicenseMIT

Please ⭐ this repo if you find it useful

Indoor Air Quality Sensor Component for Home Assistant

GitHub Release GitHub Activity License Requires.io

hacs Project Maintenance

GitHub pull requests Bugs

Community Forum

This component allows you to evaluate the air quality in any room, using data from various sensors installed there. Such as temperature, humidity, carbon dioxide sensors, etc.

The index is calculating in accordance with the IAQ UK organization methodology.

I also suggest you visit the support topic on the community forum.

Installation

HACS - Recommended

  1. Have HACS installed, this will allow you to easily manage and track updates.
  2. Search for "Indoor Air Quality UK Index".
  3. Click Install below the found integration.
  4. Configure using the configuration instructions below.
  5. Restart Home-Assistant.

Manual

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called iaquk.
  4. Download all the files from the custom_components/iaquk/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Configure using the configuration instructions below.
  7. Restart Home-Assistant.

Using your HA configuration directory (folder) as a starting point you should now also have this:

custom_components/iaquk/__init__.py
custom_components/iaquk/const.py
custom_components/iaquk/manifest.json
custom_components/iaquk/sensor.py

* * *

I put a lot of work into making this repo and component available and updated to inspire and help others! I will be glad to receive thanks from you — it will give me new strength and add enthusiasm:


Patreon
or support via Bitcoin or Etherium:
Bitcoin
16yfCfz9dZ8y8yuSwBFVfiAa3CNYdMh7Ts

Usage

To use this component in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
iaquk:
  kitchen:
    sources:
      temperature: sensor.kitchen_temperature
      humidity: sensor.kitchen_humidity
      co2: sensor.kitchen_eco2
      tvoc: sensor.kitchen_tvoc
    sensors:
      - iaq_level

  livingroom:
    name: "Living Room"
    sources:
      hcho: sensor.livingroom_formaldehyde
      pm:
        - sensor.livingroom_pm25
        - sensor.livingroom_pm10

Configuration variables

Each room in the settings is defined by its own named group of parameters. You can specify the friendly name of this group (room), the sensors involved in the calculations, and which sensors you need to create for the output.

You can create as many groups as you need. But each group must have an unique name.

name:
(string) (Optional)
Friendly name to use in the frontend.
Default value: deslugified group name

sources:
(dictionary) (Required)
Dictionary of sensors involved in the calculations. At least one sensor must be specified.

temperature:
(string) (Optional)
Room temperature sensor entity ID.
Required sensor's unit of measurement: °C or °F

humidity:
(string) (Optional)
Room humidity sensor entity ID.
Required sensor's unit of measurement: %

co2:
(string) (Optional)
Room Carbon Dioxide (CO2) sensor entity ID.
Required sensor's unit of measurement: ppm, ppb, mg/m3 or µg/m3

co:
(string) (Optional)
Room Carbon Monoxide (CO) sensor entity ID.
Required sensor's unit of measurement: ppm, ppb, mg/m3 or µg/m3

no2:
(string) (Optional)
Room Nitrogen Dioxide (NO2) sensor entity ID.
Required sensor's unit of measurement: ppm, ppb, mg/m3 or µg/m3

tvoc:
(string) (Optional)
Room tVOC sensor entity ID.
Required sensor's unit of measurement: ppm, ppb, mg/m3 or µg/m3

hcho:
(string) (Optional)
Room Formaldehyde (HCHO; CH2O) sensor entity ID.
Required sensor's unit of measurement: ppm, ppb, mg/m3 or µg/m3

radon:
(string) (Optional)
Room Radon (Rn) sensor entity ID.
Required sensor's unit of measurement: Bq/m3

pm:
(string | list) (Optional)
Room particulate matter sensors entity IDs.
Required sensor's unit of measurement: mg/m3 or µg/m3

sensors:
(list) (Optional)
List of sensors you need to create for the output. The following sensors can be added:
Default value: all sensors below

iaq_index:
The sensor displays the air quality in numerical form from 1 to 65. The higher the value, the better the air quality.

iaq_level:
The sensor shows the air quality in a human-readable form. Possible values: Excellent, Good, Fair, Poor, Inadequate.

Note:
The icon of iaq_level sensor changes its image depending on the value of the sensor.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Track updates

You can automatically track new versions of this component and update it by HACS.

License

MIT License

Copyright (c) 2019–2020 Andrey "Limych" Khrolenok

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.