You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- rewrote CSS grids and styles to fix current style on iqair.com
- added humidity and wind data
- added speed_unit to config
- removed temperature entity option
- fixed some border-radius and theme compatibility
This is a Home Assistant Lovelace card that uses the [AirVisual Sensor](https://www.home-assistant.io/components/sensor.airvisual/) to provide air quality index (AQI) data and creates a card like the ones found on [AirVisual website](https://www.airvisual.com). Requires the [AirVisual Sensor](https://www.home-assistant.io/components/sensor.airvisual/)to be setup. Tested with Yahoo and Darksky Weather component.
5
+
This is a Home Assistant Lovelace card that uses the [AirVisual component](https://www.home-assistant.io/integrations/airvisual/)or [World Air Quality Index (WAQI) component](https://www.home-assistant.io/integrations/waqi/)to provide air quality index (AQI) data and creates a card like the ones found on [AirVisual website](https://www.airvisual.com). Requires the [AirVisual component](https://www.home-assistant.io/integrations/airvisual/)or [World Air Quality Index (WAQI) component](https://www.home-assistant.io/integrations/waqi/). Tested with Yahoo and Darksky Weather component.
6
6
7
7
## Features
8
8
- Card colors and icons change depending on AQI level
9
9
10
10
11
11
## Options
12
12
13
-
| Name | Type | Default | Description
14
-
| ---- | ---- | ------- | -----------
15
-
| air_pollution_level | string | Optional | Name of the Air Pollution Level sensor created by Airvisual component. If sensor does not exist, do not add this config value.
16
-
| air_quality_index | string | Optional | Name of the Air Quality Index sensor created by Airvisual component. If sensor does not exist, do not add this config value.
17
-
| main_pollutant | string | Optional | Name of the Main Pollutant sensor created by Airvisual component. If sensor does not exist, do not add this config value.
18
-
| temp | string | Optional| Name of the temperature sensor or weather entity, such as 'weather.yweather' or 'sensor.yweather_temperature'
19
-
| country | string | Optional | Name of the country that Airvisual is collecting AQI data from.
20
-
| city | string | Optional | Name of the city that AirVisual is collecting AQI data from.
21
-
| icons | string | Optional | The local directory where the .svg files are located. For example, 'icons: "/hacsfiles/air-visual-card"' is appropriate if this plugin is installed using HACS. If left blank, icons will be loaded from Jsdeliver CDN.
22
-
| hide_title | boolean | Optional | Set to `true` if you want to hide the title that includes the city name and weather. Useful for minimalists or those using dark themes.
23
-
| hide_face | boolean | Optional | Set to `true` if you want to hide the face icon.
24
-
| weather | string | Optional | If temp field does not use a weather entity (such as 'sensor.yweather_temperature'), this attribute allows you to specify a weather state for displaying the appropiate icon on the card.
13
+
### Main Options
14
+
15
+
| Name | Type | Default | Supported options | Description |
|`type`| string |**Required**|`custom:air-visual-card`| Type of the card |
18
+
|`air_pollution_level`| string |**Required**|`sensor.u_s_air_pollution_level`| Name of the Air Pollution Level sensor. |
19
+
|`air_quality_index`| string | optional |`sensor.u_s_air_quality_index`| Name of the Air Quality Index sensor. If sensor does not exist, do not add this config value. |
20
+
|`main_pollutant`| string | optional |`sensor.u_s_main_pollutant`| Name of the Main Pollutant sensor. If sensor does not exist, do not add this config value. |
21
+
|`weather`| string | optional |`weather.dark_sky`| Name of the weather entity if you wish to display temperature, humidity and wind information on the card. |
22
+
|`country`| string |`US`|`mdi:air-conditioner`| Name of the country that Airvisual is collecting AQI data from. |
23
+
|`city`| string | optional |`San Francisco`| Name of the city that AirVisual is collecting AQI data from. |
24
+
|`icons`| string |`/hacsfiles/air-visual-card`|`/hacsfiles/air-visual-card`| The local directory where the .svg files are located. For example, 'icons: "/hacsfiles/air-visual-card"' is appropriate if this plugin is installed using HACS. If left blank, icons will be loaded from default location. |
25
+
|`hide_title`| boolean |`true`|`true`|`false`| Set to `true` if you want to hide the title that includes the city name. Useful for minimalists or those using dark themes. |
26
+
|`hide_face`| boolean |`false`|`true`|`false`| Set to `true` if you want to hide the face icon. |
27
+
|`hide_weather`| boolean |`true`|`true`|`false`| Set to `false` if you want to show the weather information from the weather entity. |
28
+
29
+
25
30
26
31
## HACS Installation
27
32
1. Open the HACS on your Home Assistant instance.
@@ -35,47 +40,29 @@ This is a Home Assistant Lovelace card that uses the [AirVisual Sensor](https://
35
40
36
41
```yaml
37
42
resources:
38
-
- url: /local/air-visual-card.js
43
+
- url: /local/air-visual-card/air-visual-card.js
39
44
type: js
40
45
```
41
46
4. **Optional:** If you wish to store the Airvisual icons locally, then download the icons [here](https://github.com/dnguyen800/air-visual-card/tree/master/dist).
42
47
43
-
5. Save the icons in a directory in Home Assistant, such as ''/local/icons/aqi_icons"
48
+
5. Save the icons in a directory in Home Assistant, such as `/local/air-visual-card`
44
49
45
50
6. Update the card configuration in `ui-lovelace.yaml` to include the following (use directory name in step #7):
46
51
47
52
```yaml
48
-
icons: "/local/icons/aqi_icons"
53
+
icons: "/local/air-visual-card"
49
54
```
50
55
51
56
## Instructions
52
57
1. Install the [AirVisual sensor](https://www.home-assistant.io/components/sensor.airvisual/) and confirm AQI, APL, and Main Pollutant sensors are created, like below.
53
58
54
59

55
60
56
-
2. Write configuration for the card and list your AirVisual sensors. MAKE SUREAn examples is provided below:
57
-
58
-
Direct editing within the YAML files (`ui-lovelace.yaml`)
0 commit comments