|
| 1 | +--- |
| 2 | +layout: page |
| 3 | +title: "AirVisual" |
| 4 | +description: "Instructions on how to use AirVisual data within Home Assistant" |
| 5 | +date: 2017-09-06 12:15 |
| 6 | +sidebar: true |
| 7 | +comments: false |
| 8 | +sharing: true |
| 9 | +footer: true |
| 10 | +logo: airvisual.jpg |
| 11 | +ha_category: Health |
| 12 | +ha_release: 0.53 |
| 13 | +ha_iot_class: "Cloud Polling" |
| 14 | +--- |
| 15 | + |
| 16 | +The `airvisual` sensor platform queries the [AirVisual](https://airvisual.com/) API for air quality |
| 17 | +data on the nearest city to a latitude and longitude. The resulting information |
| 18 | +creates sensors for the Air Quality Index (AQI), the human-friendly air quality |
| 19 | +level, and the main pollutant of that area. Sensors that conform to either/both |
| 20 | +the [U.S. and Chinese air quality standards](http://www.clm.com/publication.cfm?ID=366) can be created. |
| 21 | + |
| 22 | +This platform requires an AirVisual API key, which can be obtained [here](https://airvisual.com/api). Note |
| 23 | +that the platform was designed using the "Community" package; the "Startup" |
| 24 | +and "Enterprise" package keys should continue to function, but actual results |
| 25 | +may vary (or not work at all). |
| 26 | + |
| 27 | +<p class='note warning'> |
| 28 | +The "Community" API key is limited to 10,000 calls per month. In order to leave |
| 29 | +a buffer, the `airvisual` platform queries the API every 10 minutes. |
| 30 | +</p> |
| 31 | + |
| 32 | +## {% linkable_title Configuring the Platform %} |
| 33 | + |
| 34 | +To enable this platform, add the following lines to your `configuration.yaml` |
| 35 | +file: |
| 36 | + |
| 37 | +```yaml |
| 38 | +sensor: |
| 39 | + - platform: airvisual |
| 40 | + api_key: abc123 |
| 41 | + monitored_conditions: |
| 42 | + - us |
| 43 | + - cn |
| 44 | + latitude: 42.81212 |
| 45 | + longitude: 108.12422 |
| 46 | + radius: 500 |
| 47 | +``` |
| 48 | +
|
| 49 | +Configuration variables: |
| 50 | +
|
| 51 | +- **api_key** (*Required*): your AirVisual API key |
| 52 | +- **monitored_conditions** (*Required*): the air quality standard(s) to use |
| 53 | +(`us` for U.S., `cn` for Chinese) |
| 54 | +- **latitude** (*Optional*): the latitude to monitor; if excluded, the latitude |
| 55 | +defined in `configuration.yaml` will be used |
| 56 | +- **longitude** (*Optional*): the longitude to monitor; if excluded, the longitude |
| 57 | +defined in `configuration.yaml` will be used |
| 58 | +- **radius** (*Optional*): the radius (in meters) around the latitude/longitude to |
| 59 | +search for the nearest city; defaults to `1000` |
| 60 | + |
| 61 | +## {% linkable_title Sensor Types %} |
| 62 | + |
| 63 | +When configured, the platform will create three sensors for each configured |
| 64 | +air quality standard: |
| 65 | + |
| 66 | +### Air Quality Index |
| 67 | + |
| 68 | +**Description:** This sensor displays a numeric air quality index (AQI), a metric |
| 69 | +for the overall "health" of the air. |
| 70 | + |
| 71 | +**Example Sensor Name:** `sensor.chinese_air_quality_index` |
| 72 | + |
| 73 | +**Example Sensor Value:** `32` |
| 74 | + |
| 75 | +**Explanation:** |
| 76 | + |
| 77 | +AQI | Status | Description |
| 78 | +------- | :----------------: | ---------- |
| 79 | +0 - 50 | **Good** | Air quality is considered satisfactory, and air pollution poses little or no risk |
| 80 | +51 - 100 | **Moderate** | Air quality is acceptable; however, for some pollutants there may be a moderate health concern for a very small number of people who are unusually sensitive to air pollution |
| 81 | +101 - 150 | **Unhealthy for Sensitive Groups** | Members of sensitive groups may experience health effects. The general public is not likely to be affected |
| 82 | +151 - 200 | **Unhealthy** | Everyone may begin to experience health effects; members of sensitive groups may experience more serious health effects |
| 83 | +201 - 300 | **Very unhealthy** | Health warnings of emergency conditions. The entire population is more likely to be affected |
| 84 | +301+ | **Hazardous** | Health alert: everyone may experience more serious health effects |
| 85 | + |
| 86 | +### Air Polution Level |
| 87 | + |
| 88 | +**Description:** This sensor displays the associated `Status` (from the above |
| 89 | +table) for the current AQI. |
| 90 | + |
| 91 | +**Sample Sensor Name:** `sensor.us_air_pollution_level` |
| 92 | + |
| 93 | +**Example Sensor Value:** `Moderate` |
| 94 | + |
| 95 | +### Main Pollutant |
| 96 | + |
| 97 | +**Description:** This sensor displays the pollutant whose value is currently |
| 98 | +highest. |
| 99 | + |
| 100 | +**Sample Sensor Name:** `sensor.us_main_pollutant` |
| 101 | + |
| 102 | +**Example Sensor Value:** `PM2.5` |
| 103 | + |
| 104 | +**Explanation:** |
| 105 | + |
| 106 | +Pollutant | Symbol | More Info |
| 107 | +------- | :----------------: | ---------- |
| 108 | +Particulate (<= 2.5 μm) | PM2.5 | [EPA: Particulate Matter (PM) Pollution ](https://www.epa.gov/pm-pollution) |
| 109 | +Particulate (<= 10 μm) | PM10 | [EPA: Particulate Matter (PM) Pollution ](https://www.epa.gov/pm-pollution) |
| 110 | +Ozone | O | [EPA: Ozone Pollution](https://www.epa.gov/ozone-pollution) |
| 111 | +Sulpher Dioxide | SO2 | [EPA: Sulfur Dioxide (SO2) Pollution](https://www.epa.gov/so2-pollution) |
| 112 | +Carbon Monoxide | CO | [EPA: Carbon Monoxide (CO) Pollution in Outdoor Air](https://www.epa.gov/co-pollution) |
0 commit comments