#air_quality building block integration

1 messages · Page 1 of 1 (latest)

rare plume
#

I went to make a smoke alarm automation, and the trigger option I selected from the list was air_quality.smoke_detected which is exactly what I want. Now I want to send a notification as to what sensor triggered the automation using a template. I can't find how to extract that from the trigger. I did find the source and can see other entities such as gas_detected, but I want to send a message such as "Smoke Detected on Mainfloor by Livingroom Smoke Detector".
Is this documented somwhere scince I can't figure out how to find it?

midnight crypt
#

When the automation triggers, you can either click on the Triggered header in the automation editor, or look in the trace logs, and it shows you what is available in the trigger object.

#

You can see here what is available in the trigger object for this trigger, you have trigger.to_state which contains the entity_id of the triggering sensor, the friendly name, etc

rare plume
#

I'll try that. Since this is for smoke alarms it is more difficult to trigger it, and I don't want to scare my wife. So I was hoping there was a way in the developer tools panel to explore the air_quality attributes

midnight crypt
#

you can fake the trigger in developer-tools/states

#

just change the state of the binary_sensor from off to on