Automation using several Smoke sensors

I have 11 smoke sensors in my house.
Now I want to build an automation that triggers when any one of those detects smoke.

So far I have done this by building a group and using that as trigger. The disadvantage is, that I don’t get any information, which of the detectors triggered it - so I wanna change that.

One idea is to add the detectors as seperate triggers to the automation - then I should be able to access the variables on the trigger and find out which entity triggered it.
Maybe I could also use the new custom variables on triggers to directly get a real message out of it.

Or could that even be done with blueprints (a trigger blueprint?).

I would be interested in your thoughts what would make sense and be an elegant way to acheive this.
Thanks in advance.

Trigger on the group and include this in your message:

data:
  message: "Triggered by: {{ expand('group.all_smoke_sensors')|selectattr('state','eq','on')|map(attribute='name')|join(', ') }}"
2 Likes

Wow, that is a neat and simple solution.

Thank you very much!

1 Like

I am in the same situation.

I am guessing the difference is that the group is created through a helper which makes it a binary sensor.

How should I create the group to get the solution of tom_l to work?

alias: Declenchement alarmes incendie
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.alarmes_incendie_statut
    to: "on"
    from: "off"
condition: []
action:
  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.groupe_alarmes_incendie_declenchement
    enabled: false
  - service: notify.mobile_app_mobile_louis
    metadata: {}
    data:
      message: Détection incendie !!!
      data:
        message: >-
          Déclenché par: {{
          expand('binary_sensor.alarmes_incendie_statut')|selectattr('state','eq','on')|map(attribute='name')|join(',
          ') }}
mode: single