Setting up new automation - trying to wrap my head around customizing it?

Greetings friends. I hope this is ok to post. I am a brand-new user and have several sonoff door sensors setup and working fine. I am trying to create an automation to notify my phone when any one of the doors is opened. Right now I have 1 automation setup for each door that works fine. I wanted to try and create 1 automation that works for all 3 door sensors instead of having to turn on all 3 door automations. The problem I am having is making the phone notify message show which door was opened. I will have 3 triggers setup (one for each door sensor) and I need the notify message to tell me which door was opened. Including a capture of my trigger and action because I am probably not explaining it right :smile:

Action Message* “{{Device}} door has been opened!”

I am only seeing door has been opened! on my phone notification. What can I use in the Action message that will tell me which door was opened?

Might be a little overkill, but the Alarmo integration does this quite well. It’s basically an alarm system in HA. You install the integration, it finds your contact sensors, and then you can create an alert whenever a door is opened during a certain time. It’s smart enough to know which door was opened and sends the correct door name through the notification.

1 Like

Here is the cut-down version of something I use:

alias: Announce Light turned on
trigger:
  - entity_id:
      - light.bulb_01
      - light.bulb_02
      - light.bulb_03
    from: 'off'
    platform: state
    to: 'on'
action:
  - service: notify.mobile_app_drdashboard
    data_template:
      title: '{{ trigger.to_state.name }} turned {{ trigger.to_state.state }}'
      message: TTS
      data:
        ttl: 0
        priority: high
        channel: alarm_stream
mode: single

The announcement happens via voice on my tablet/dashboard in my case, but as you have it figured out for your automations already that part should be easy to change.

That’s exactly what I wanted! Works great! Thanks!