PM4 level changed

The PM4 level changed trigger fires after the PM4 (particulate matter 4 micrometers or smaller) reading on one or more air quality sensors changes by a meaningful amount. PM4 particles come from sources like pollen, mold spores, dust, and certain industrial processes. They sit between the finer PM2.5 and the coarser PM10 range, giving you an additional view of the particles floating in your air. If you deal with seasonal allergies or live near a dusty road, tracking PM4 helps you spot irritants before your nose does.

Imagine your home office air purifier starting as soon as pollen counts shift on a spring afternoon, so you stay focused instead of reaching for tissues. Use this trigger to start filtration, log changes, or notify household members whenever PM4 readings shift noticeably.

Labs

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:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation, or select Create automation > Create new automation.
  3. In the When section, select Add trigger.
  4. 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.
  5. From the triggers shown for that target, select PM4 level changed.
  6. Under Threshold type, set how much the level has to change before the trigger fires.
  7. Select Save.

Options in the UI

Threshold type (Required)

How much the PM4 level has to change before the trigger fires. Can be a fixed number, or reference a helper entity that provides the value.

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.pm4_changed. A basic example looks like this:

TriggerA trigger is a set of values or conditions of a platform that are defined to cause an automation to run. [Learn more]
trigger: air_quality.pm4_changed
target:
  entity_id: sensor.office_pm4
options:
  threshold: 10

This fires whenever the office PM4 sensor reading changes by at least 10 micrograms per cubic meter.

Options in YAML

YAML sometimes provides additional options for more complex use cases that are not available through the UI.

threshold any Required

The minimum amount the PM4 level must change before the trigger fires. Accepts a number, or a reference to an input_number, number, or sensor entity.

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

  • PM4 fills the gap between PM2.5 and PM10 measurements, which is useful if your sensor reports this size range separately.
  • The trigger fires on any change that meets the threshold, whether the level goes up or down.
  • To react only when PM4 crosses a specific concentration in one direction, use PM4 level 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.

Tip

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: notify when office PM4 shifts

Allergy season and dusty days make it hard to focus when you work from home. This automation sends a notification when PM4 levels in your home office change noticeably, so you know exactly when to turn on the air purifier or crack a window.

  • Trigger: PM4 level changed
  • Target: Office PM4 sensor
  • Threshold type: 10
  • Action: Notify mobile app
YAML example for PM4 office notification
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Notify on office PM4 change"
triggers:
  - trigger: air_quality.pm4_changed
    target:
      entity_id: sensor.office_pm4
    options:
      threshold: 10
actions:
  - action: notify.mobile_app_phone
    data:
      title: "PM4 change detected"
      message: "PM4 levels in the office changed. Consider turning on the air purifier."

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.

Tip

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: