A custom Lovelace card inspired by the Awair air quality monitor UI.
Displays up to 5 sensors with a dot-bar indicator, color-coded by severity, and a score ring or inline score column. Fully configurable via the Home Assistant UI editor โ no YAML required.
3 themes ร 5 score positions = 15 combinations.
| โฌ Center | โ Left | Right โถ |
|---|---|---|
| โ Inline Left | Inline Right โ |
|---|---|
| โฌ Center | โ Left | Right โถ |
|---|---|---|
| โ Inline Left | Inline Right โ |
|---|---|
| โฌ Center | โ Left | Right โถ |
|---|---|---|
| โ Inline Left | Inline Right โ |
|---|---|
| Value | Description |
|---|---|
center |
Score ring centered above the sensor row (default) |
left |
Score ring on the left, sensors fill the remaining width |
right |
Score ring on the right, sensors fill the remaining width |
inline_left |
No ring โ score as first column (left) with dot indicator |
inline_right |
No ring โ score as last column (right) with dot indicator |
- Score ring or inline score column with color-coded severity label
- Up to 5 sensor columns with 5-dot bar indicators
- Sensor dots follow the Awair Element style: more lit dots = worse, each dot has a fixed color by position (๐ข โ ๐ก โ ๐ โ ๐ด โ ๐ฃ from bottom to top)
- Score dots (inline positions) follow the inverted score semantic: more lit dots = better, all lit dots share the current score's color
- Three visual themes:
default,mushroom,bubble - Five score positions:
center,left,right,inline_left,inline_right - Full UI editor โ configure everything without touching YAML
- Sensors can be added, removed, and reordered in the editor
- Awair thresholds pre-loaded as defaults
- Tap any sensor column to open the entity detail dialog (or configure a custom
tap_action) - Built on top of
LitElementand<ha-form>for native Home Assistant look-and-feel - Locale-aware value formatting (respects your HA profile's number format)
getGridOptions()support for the Sections dashboard (HA 2024.10+)
- Home Assistant 2026.5.0 or newer. Older HA cores must use Air Dots Card 0.8.8.
- Open HACS in Home Assistant
- Go to Frontend โ click โฎ โ Custom repositories
- Add
https://github.com/tioan/air-dots-cardwith category Lovelace - Search for Air Dots Card and install it
- Hard-reload the browser (
Ctrl+Shift+R)
1 โ Copy the file
Copy air-dots-card.js into your Home Assistant www folder:
/config/www/air-dots-card.js
If the
wwwfolder doesn't exist yet, create it inside/config/.
2 โ Register the resource
Go to Settings โ Dashboards โ โฎ Menu โ Resources and add:
| Field | Value |
|---|---|
| URL | /local/air-dots-card.js |
| Resource type | JavaScript Module |
3 โ Add the card via UI
Click Add Card, search for Air Dots Card and select it. The card opens in the visual editor.
The editor is fully translated โ it switches language automatically based on your browser locale, or you can set it explicitly via the language dropdown.
| Setting | Description |
|---|---|
| Theme | Visual style: Default, Mushroom or Bubble Card |
| Score position | center ยท left ยท right ยท inline_left ยท inline_right |
| Language | Auto (browser locale) ยท English ยท Deutsch |
| Card title | Optional label above the card |
| Score entity | HA sensor providing the score (0โ100) |
| Sensor entity | Entity picker per sensor (auto-fills label/unit from entity attributes if blank) |
| Label / Unit | Display name and unit string โ leave blank to inherit friendly_name / unit_of_measurement from the entity |
| Thresholds | 4 values defining the 5 severity levels |
| Symmetric scale | Toggle for sensors where the optimal range is in the middle (temp, humidity) |
Sensors can be reordered with โ / โ and removed with โ. New sensors are added with + Add sensor and come pre-filled with the next Awair default.
Tip: Switch between visual editor and YAML at any time using the
< >toggle in the card editor header.
type: custom:air-dots-card
title: Living Room
theme: default # default | mushroom | bubble
score_position: center # center | left | right | inline_left | inline_right
language: auto # auto | en | de
score_entity: sensor.awair_element_score
sensors:
- entity: sensor.awair_element_temperature
label: Temp
unit: "ยฐC"
thresholds: [18, 20, 25, 27]
symmetric: true
- entity: sensor.awair_element_humidity
label: Humidity
unit: "%"
thresholds: [30, 40, 60, 65]
symmetric: true
- entity: sensor.awair_element_co2
label: "COโ"
unit: ppm
thresholds: [600, 1000, 2000, 4500]
- entity: sensor.awair_element_voc
label: Chemicals
unit: ppb
thresholds: [300, 500, 3000, 25000]
- entity: sensor.awair_element_pm25
label: PM2.5
unit: "ยตg/mยณ"
thresholds: [12, 35, 55, 150]| Option | Type | Default | Description |
|---|---|---|---|
theme |
string | default |
default ยท mushroom ยท bubble |
score_position |
string | center |
center ยท left ยท right ยท inline_left ยท inline_right |
language |
string | auto |
auto (HA profile language) ยท en ยท de |
title |
string | โ | Optional label above the card |
score_entity |
string | โ | HA sensor providing score (0โ100) |
sensors |
list | โ | List of sensor definitions |
score_tap_action |
object | more-info |
Tap action for the inline score column. See Tap actions below. |
| Option | Type | Required | Description |
|---|---|---|---|
entity |
string | โ | Entity ID |
label |
string | โ | Display name |
unit |
string | โ | Unit string |
thresholds |
list | โ | 4 boundary values (see below) |
symmetric |
bool | โ | true for sensors where the optimal range is in the center (temp, humidity). Thresholds define [low_bad, low_ok, high_ok, high_bad]. Default: false (linear scale, higher = worse). |
tap_action |
object | more-info |
Custom tap action for this sensor column. See Tap actions below. |
Note:
labelandunitare now optional โ if omitted, the card uses the entity'sfriendly_nameandunit_of_measurementattributes.
Note:
mushroomandbubblethemes inherit HA CSS variables automatically โ no extra integration needed.
Each sensor and the inline score column support a HA-standard tap_action
object. Without configuration the card opens the entity's more-info dialog.
sensors:
- entity: sensor.awair_element_co2
tap_action:
action: navigate # more-info | navigate | url | perform-action | none
navigation_path: /lovelace/air-quality
score_tap_action:
action: url
url_path: https://www.getawair.com/Supported actions: more-info (default), navigate (with navigation_path),
url (with url_path), perform-action / call-service
(with perform_action or service, optional data and target), none.
Temperature and humidity use a symmetric scale (both extremes are bad, middle is optimal).
COโ, TVOCs and PM2.5 are linear โ higher is always worse.
| Sensor | Unit | L1 ๐ข | L2 ๐ก | L3 ๐ | L4 ๐ด | L5 ๐ฃ | thresholds |
|---|---|---|---|---|---|---|---|
| Score | /100 | 80โ100 | 60โ80 | 40โ60 | 20โ40 | 0โ20 | (inverted) |
| Temperature | ยฐC | 20โ25 | 18โ20 / 25โ27 | 16โ18 / 27โ29 | <16 / 29โ34 | <8 / >34 | [18, 20, 25, 27] |
| Humidity | % | 40โ60 | 30โ40 / 60โ65 | 23โ30 / 65โ80 | <23 / >80 | <14 | [30, 40, 60, 65] |
| COโ | ppm | 0โ600 | 600โ1000 | 1000โ2000 | 2000โ4500 | >4500 | [600, 1000, 2000, 4500] |
| TVOCs | ppb | 0โ300 | 300โ500 | 500โ3000 | 3000โ25000 | >25000 | [300, 500, 3000, 25000] |
| PM2.5 | ยตg/mยณ | 0โ12 | 12โ35 | 35โ55 | 55โ150 | >150 | [12, 35, 55, 150] |
- Awair Element / Omni / 2nd Edition โ via Awair integration
- Sensirion SEN55 / SPS30 โ via ESPHome
- SCD40 / SCD41 โ via ESPHome
- BME680 / BME688 โ via ESPHome (no PM2.5)
- IKEA VINDSTYRKA โ via Zigbee2MQTT
Card not appearing โ Hard-reload (Ctrl+Shift+R) and clear cache.
"Custom element doesn't exist" โ Check resource URL is /local/air-dots-card.js and type is JavaScript Module. With HACS this is added automatically.
Score shows -- โ Verify score_entity exists with a numeric state.
UI editor not showing โ Resource type must be JavaScript Module, not JavaScript.
Mushroom/Bubble looks wrong โ Check your HA theme is set under Profile โ Theme.
MIT โ free to use, modify and share.
This card was developed interactively with Claude Sonnet 4.6 by Anthropic.
The design is inspired by the Awair Element air quality monitor UI.
Source code: github.com/tioan/air-dots-card