Volatile organic compounds ratio changed
The Volatile organic compounds ratio changed trigger fires after the VOC ratio reading on one or more air quality sensors changes by a meaningful amount. Some sensors express VOC concentration as a ratio (typically a percentage) rather than an absolute concentration. This ratio indicates how the current VOC level compares to a baseline, giving you a quick sense of whether air quality is improving or getting worse. It is particularly handy for tracking off-gassing from new furniture, fresh paint, or cleaning products over time.
Imagine getting a notification the moment your living room air quality starts dipping after you’ve finished cleaning, so you know to crack a window. Use this trigger to automate ventilation, send alerts, or log trends whenever your VOC ratio reading shifts noticeably.
Requires the Purpose-specific triggers and conditions Labs preview feature. Enable it at Settings > System > Labs.
Using this trigger from the user interface
If you prefer building automations visually, Home Assistant walks you through this trigger step by step. You pick what to watch, tweak a few options, and save. No YAML knowledge required.
To use this trigger in an automation:
- Go to Settings > Automations & scenes.
- Open an existing automation, or select Create automation > Create new automation.
- In the When section, select Add trigger.
- Select what you want to monitor. Under By target (see Targets), pick the area your air quality sensor is in (like your living room or bedroom). You can also select a floor, a device, a specific entity, or a label.
- From the triggers shown for that target, select Volatile organic compounds ratio changed.
- Under Threshold type, set how much the ratio has to change before the trigger fires.
- Select Save.
Options in the UI
Using this trigger in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, refer to this trigger as air_quality.voc_ratio_changed. A basic example looks like this:
trigger: air_quality.voc_ratio_changed
target:
entity_id: sensor.living_room_voc_ratio
options:
threshold: 5
This fires whenever the living room VOC ratio changes by at least 5 percent.
Options in YAML
YAML sometimes provides additional options for more complex use cases that are not available through the UI.
Targets
This trigger supports targets. A target tells Home Assistant what the trigger should watch. You can point it at a single entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more], a device, an area, a floor, or a label, and Home Assistant watches every matching air_quality entity behind that target.
-
Entity: one specific air_quality entity, such as
air_quality.living_room. - Device: every air_quality entity that belongs to a device.
- Area: every air_quality entity in a room or area.
- Floor: every air_quality entity on a floor.
- Label: every air_quality entity that shares a label.
You can also mix target types in one trigger. For example, combine a specific entity with an area to watch both at once.
Good to know
- The VOC ratio provides a relative reading. A rising ratio means air quality is degrading compared to the sensor’s baseline.
- The trigger fires on any change that meets the threshold, whether the ratio goes up or down.
- To react only when the VOC ratio crosses a specific value in one direction, use Volatile organic compounds ratio crossed threshold instead.
Try it yourself
Ready to test this? Go to Settings > Automations & scenes, create a new automation, and add this trigger. Save the automation, then change the state of the targeted entity to watch the trigger fire on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more].
More examples
Real scenarios where this trigger fires in automations and scripts. Copy any example and adapt it to your setup.
You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.
Automation: alert when living room air quality shifts
Maybe someone just sprayed cleaning solution, or the new couch is off-gassing. This automation sends a notification when the VOC ratio in the living room changes significantly so you know to investigate the cause and open a window.
- Trigger: Volatile organic compounds ratio changed
- Target: Living room VOC ratio sensor
- Threshold type: 5
- Action: Notify mobile app
YAML example for VOC ratio alert
alias: "Alert on VOC ratio change"
triggers:
- trigger: air_quality.voc_ratio_changed
target:
entity_id: sensor.living_room_voc_ratio
options:
threshold: 5
actions:
- action: notify.mobile_app_phone
data:
title: "VOC ratio changed"
message: "The VOC ratio in the living room shifted. Check ventilation."
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the trigger you’re using and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain triggers or suggest the right one when you describe what you want in plain language.
Related triggers
These triggers work well alongside this one:
- Volatile organic compounds ratio crossed threshold - Triggers after one or more volatile organic compounds ratios cross a threshold.