[Help Needed] Ikea Vindstyrka automation trigger not fired (zigbee2mqtt)

Nearby residents do backyard burning like every evening. So I’m trying to get alerted when pm2.5 gets above the threshold so that I can shut doors and windows promptly.

I’ve successfully paired Ikea Vindstyrka to HA thru zigbee2mqtt, the readings of sensors are coming thru to the dashboard every sec. Now I’m trying get automation to work, for my test I’m adding a trigger with condition of pm2.5 getting above 1, and an action of a simple notification.

I added trigger and action through the UI, like in this screenshot:

The yaml generated by the ui (i’m masking device & entity ids, just in case):

alias: pm2.5 concentration changes
description: ""
trigger:
  - type: pm25
    platform: device
    device_id: 0a0c01ac01d759a7e6xxxxxxxxxxxx
    entity_id: c9d92f1c9ab1bfe91f6axxxxxxxxxxxx
    domain: sensor
    above: 1
condition: []
action:
  - service: notify.persistent_notification
    metadata: {}
    data:
      message: pm2.5 concentration changes
mode: restart

Anyone can help suggest how should I troubleshoot this further?

I would suggest pointing this towards your neighbors backyard whenever pm2.5 gets over the set threshold:

The notification isnt sent out? or?
Can you see in the logging that te value IS higher than 1?

I don’t see what you are trying to get out of this question?

@SandyBee ,

yes, in the logs the values are certainly higher than 1.

Zigbee2MQTT:info  2024-01-20 14:34:59: MQTT publish: topic 'zigbee2mqtt/Ikea Air Quality Main', payload '{"humidity":60,"linkquality":168,"pm25":32,"temperature":32,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voc_index":98}'
Zigbee2MQTT:info  2024-01-20 14:35:00: MQTT publish: topic 'zigbee2mqtt/Ikea Air Quality Main', payload '{"humidity":60,"linkquality":148,"pm25":32,"temperature":32,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voc_index":98}'
Zigbee2MQTT:info  2024-01-20 14:35:00: MQTT publish: topic 'zigbee2mqtt/Ikea Air Quality Main', payload '{"humidity":60,"linkquality":156,"pm25":32,"temperature":32,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voc_index":98}'

The problem seems to be more with the trigger - it got fired from time to time, but not as often as it should be. i.e. instead of firing every few seconds, it got fired like every 5-10 minutes a few times in the beginning, then later it didn’t get fired until hours have passed.

The trigger you are using behaves the same way as a Numeric State Trigger. It will trigger at the moment that the sensor’s value increases and crosses the threshold value of 1.

For example, it will trigger at the instant when the sensor’s value increases from 0.8 to 1.1. If the sensor’s value continues to increase after crossing the threshold, it doesn’t serve to trigger the automation again. The sensor’s value must first decrease below the threshold and then increase above it in order to trigger again.

If you want to be notified every time there’s any change to the sensor’s value (you will receive a lot of notifications), use a Device Trigger without the above option, or a State Trigger, and a Numeric State Condition that checks if the sensor’s value is above 1.